add some help output in cdist-explorer-run for bogus situations

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-02-23 10:04:12 +01:00
parent d58d13910b
commit b222b79407

View file

@ -58,10 +58,22 @@ scp * "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_remote_src_dir}"
# Execute all explorers # Execute all explorers
for explorer in *; do for explorer in *; do
if [ -f "$explorer" ]; then
if [ ! -x "$explorer" ]; then
echo "Explorer \"$explorer\" exists, but is not executable."
continue
fi
# Execute explorers and save results in remote destination directory # Execute explorers and save results in remote destination directory
ssh "${__cdist_remote_user}@${__cdist_target_host}" \ ssh "${__cdist_remote_user}@${__cdist_target_host}" \
"cd \"${__cdist_remote_src_dir}\" && \"./$explorer\" > \ "cd \"${__cdist_remote_src_dir}\" && \"./$explorer\" > \
\"${__cdist_remote_dst_dir}/${explorer}\"" "$@" \"${__cdist_remote_dst_dir}/${explorer}\"" "$@"
else
if [ -e "$explorer" ]; then
echo "Explorer \"$explorer\" exists, but is not a file."
continue
fi
fi
done done
# Copy results back to us # Copy results back to us