]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cdebugpack: behave when /bin/sh is dash
authorSage Weil <sage@newdream.net>
Thu, 7 Oct 2010 16:47:34 +0000 (09:47 -0700)
committerSage Weil <sage@newdream.net>
Thu, 7 Oct 2010 16:47:34 +0000 (09:47 -0700)
Signed-off-by: Sage Weil <sage@newdream.net>
src/cdebugpack.in

index bee913556edc5bf7412d2bf1de9b8718ad657d83..eb1cdf099b2a083a54e9e65f50525ad47e46db94 100644 (file)
@@ -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