From: Sage Weil Date: Thu, 7 Oct 2010 16:47:34 +0000 (-0700) Subject: cdebugpack: behave when /bin/sh is dash X-Git-Tag: v0.22~35 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=6545f3ca1c9d358870e643bb511bd318710f2b94;p=ceph.git cdebugpack: behave when /bin/sh is dash Signed-off-by: Sage Weil --- diff --git a/src/cdebugpack.in b/src/cdebugpack.in index bee913556edc5..eb1cdf099b2a0 100644 --- a/src/cdebugpack.in +++ b/src/cdebugpack.in @@ -33,8 +33,10 @@ wait_pid_exit() { [ -e /proc/$pid ] || return sleep 1 done - echo Killing pid $pid - kill $pid + if [ -e /proc/$pid ]; then + echo Killing pid $pid + kill $pid + fi } @@ -60,14 +62,14 @@ esac shift done -[ "$dest_tar" == "" ] && usage_exit +[ "$dest_tar" = "" ] && usage_exit # get absolute path for dest_tar -[ "${dest_tar::1}" != "/" ] && dest_tar="`pwd`/$dest_tar" +[ `echo $dest_tar | cut -c 1` != "/" ] && dest_tar="`pwd`/$dest_tar" bins="cmon cmds cosd" core_paths="/ $BINDIR $BINDBGDIR" -[ "$conf" == "" ] && conf=$ETCDIR/ceph.conf +[ "$conf" = "" ] && conf=$ETCDIR/ceph.conf log_path=`$CCONF -c $conf "log dir"` [ -z "$conf" ] && usage_exit