From: Loic Dachary Date: Mon, 16 Dec 2013 15:27:34 +0000 (+0100) Subject: vstart/stop: use pkill instead of killall X-Git-Tag: v0.75~88^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d93881f3c8ab634da782894d5dfc1755569e8cf2;p=ceph.git vstart/stop: use pkill instead of killall killall fails to kill all OSDs when called as a oneliner. Replace with a loop using pkill that retries until there are no more process to kill by the required name. Signed-off-by: Loic Dachary --- diff --git a/src/stop.sh b/src/stop.sh index 3a3ed16e679..4891336502b 100755 --- a/src/stop.sh +++ b/src/stop.sh @@ -1,4 +1,20 @@ -#!/bin/sh +#!/bin/bash -x +# +# Copyright (C) 2013 Inktank +# Copyright (C) 2013 Cloudwatt +# +# Author: Loic Dachary +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Library Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Library Public License for more details. +# test -d dev/osd0/. && test -e dev/sudo && SUDO="sudo" @@ -41,7 +57,9 @@ while [ $# -ge 1 ]; do done if [ $stop_all -eq 1 ]; then - killall ceph-mon ceph-mds ceph-osd radosgw lt-radosgw apache2 + for p in ceph-mon ceph-mds ceph-osd radosgw lt-radosgw apache2 ; do + while pkill $p ; do : ; done + done pkill -f valgrind.bin.\*ceph-mon $SUDO pkill -f valgrind.bin.\*ceph-osd pkill -f valgrind.bin.\*ceph-mds