From 3b159e4e60a68ac0ee9a8d053c7b1548df56c73c Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 14 Sep 2007 09:25:11 +1000 Subject: [PATCH] wait for ctdbd to finish cleanup before considering "service ctdb stop" to be done (This used to be ctdb commit 216eb4be7ec481cfe9aaeeada257b77cb394d2e4) --- ctdb/config/ctdb.init | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/ctdb/config/ctdb.init b/ctdb/config/ctdb.init index 4f8b61b7bc0..12443c0a1fa 100755 --- a/ctdb/config/ctdb.init +++ b/ctdb/config/ctdb.init @@ -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 -- 2.47.3