From ccabc9cffb113094f332d103736d392614d33c27 Mon Sep 17 00:00:00 2001 From: "Ruben S. Montero" Date: Thu, 7 Oct 2010 18:37:16 +0200 Subject: [PATCH] Fix bug in new run probes --- src/im_mad/remotes/run_probes | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/im_mad/remotes/run_probes b/src/im_mad/remotes/run_probes index f32f2f58a2..3209b285bc 100755 --- a/src/im_mad/remotes/run_probes +++ b/src/im_mad/remotes/run_probes @@ -16,17 +16,18 @@ # limitations under the License. # #--------------------------------------------------------------------------- # +HYPERVISOR_DIR=$1.d +ARGUMENTS=$* + SCRIPTS_DIR=`dirname $0` cd $SCRIPTS_DIR - function run_dir { ( - DIR=$1.d - cd $DIR + cd $1 for i in `ls *`;do if [ -x "$i" ]; then - ./$i $* + ./$i $ARGUMENTS EXIT_CODE=$? if [ "x$EXIT_CODE" != "x0" ]; then echo "Error executing $i" 1>&2 @@ -39,7 +40,7 @@ function run_dir { data=$( if [ -d "$HYPERVISOR_DIR" ]; then - run_dir $* + run_dir "$HYPERVISOR_DIR" fi )