]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: use kill instead of pkill in osd-pool-create 985/head
authorLoic Dachary <loic@dachary.org>
Mon, 23 Dec 2013 12:10:18 +0000 (13:10 +0100)
committerLoic Dachary <loic@dachary.org>
Mon, 23 Dec 2013 12:10:18 +0000 (13:10 +0100)
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 <loic@dachary.org>
src/test/mon/osd-pool-create.sh

index bb2b0a0e7a7da366f2b224e402278d494f3fa4d8..9f58f00bd818d6f53be2047d085909937bb3ee73 100755 (executable)
@@ -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
 }