1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-03 12:58:35 +03:00

wait for ctdbd to finish cleanup before considering "service ctdb stop" to be done

(This used to be ctdb commit 216eb4be7ec481cfe9aaeeada257b77cb394d2e4)
This commit is contained in:
Andrew Tridgell 2007-09-14 09:25:11 +10:00
parent 9cf96a5e4c
commit 3b159e4e60

View File

@ -92,12 +92,17 @@ start() {
stop() {
echo -n $"Shutting down ctdbd service: "
ctdb shutdown
killall -q -0 ctdbd && {
# if it survived, give it 1 second then kill it with extreme prejudice
sleep 1
killall -q -9 ctdbd
}
RETVAL=$?
count=0
while killall -q -0 ctdbd; do
sleep 1
count=`expr $count + 1`
[ $count -gt 10 ] && {
echo -n $"killing ctdbd "
killall -q -9 ctdbd
pkill -f -9 /etc/ctdb/events.d/
}
done
case $init_style in
suse)
rc_status -v