From 51669874a771b3919bae096a357d179dfa636a53 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 09:37:07 +0100 Subject: [PATCH] extend cdist-explorer-run to accept arguments for explorers Signed-off-by: Nico Schottelius --- bin/cdist-explorer-run | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/bin/cdist-explorer-run b/bin/cdist-explorer-run index 23f8a6eb..8ed3c791 100755 --- a/bin/cdist-explorer-run +++ b/bin/cdist-explorer-run @@ -24,8 +24,8 @@ . cdist-config -if [ $# -ne 5 ]; then - __cdist_usage " " +if [ $# -lt 5 ]; then + __cdist_usage " [explorer args]" fi set -ue @@ -36,10 +36,6 @@ __cdist_local_dst_dir="$1"; shift __cdist_remote_src_dir="$1"; shift __cdist_remote_dst_dir="$1"; shift -################################################################################ -# New code -# - # Create remote source and destination directory ssh "${__cdist_remote_user}@${__cdist_target_host}" \ "mkdir -p \"${__cdist_remote_src_dir}\" \ @@ -65,7 +61,7 @@ for explorer in *; do # Execute explorers and save results in remote destination directory ssh "${__cdist_remote_user}@${__cdist_target_host}" \ "cd \"${__cdist_remote_src_dir}\" && \"./$explorer\" > \ - \"${__cdist_remote_dst_dir}/${explorer}\"" + \"${__cdist_remote_dst_dir}/${explorer}\"" "$@" done # Copy results back to us