From: Loic Dachary Date: Mon, 23 Dec 2013 12:10:18 +0000 (+0100) Subject: mon: use kill instead of pkill in osd-pool-create X-Git-Tag: v0.75~47^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F985%2Fhead;p=ceph.git mon: use kill instead of pkill in osd-pool-create The --pidfile option of pkill is not supported by all versions. Use kill instead for compatibility. Instead of looping on : loop on sleep 1 so an inifinite loop does is slower at filling the disk. Signed-off-by: Loic Dachary --- diff --git a/src/test/mon/osd-pool-create.sh b/src/test/mon/osd-pool-create.sh index bb2b0a0e7a7..9f58f00bd81 100755 --- a/src/test/mon/osd-pool-create.sh +++ b/src/test/mon/osd-pool-create.sh @@ -40,7 +40,7 @@ function run_mon() { } function kill_mon() { - while pkill --pidfile $DIR/pidfile ; do : ; done + while [ -f $DIR/pidfile ] && kill $(cat $DIR/pidfile) ; do sleep 1 ; done rm -fr $DIR/store.db }