From: Andrew Tridgell Date: Thu, 13 Sep 2007 04:36:23 +0000 (+1000) Subject: ensure smbd and winbindd do die in 50.samba X-Git-Tag: tevent-0.9.20~348^2~2410 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2f86c3f827b2e92904f602759a974253926ae0f5;p=thirdparty%2Fsamba.git ensure smbd and winbindd do die in 50.samba (This used to be ctdb commit 6f23affedb626fc7a5ca86c4763f3045a5586231) --- diff --git a/ctdb/config/ctdb.init b/ctdb/config/ctdb.init index 06ba285edf1..4f8b61b7bc0 100755 --- a/ctdb/config/ctdb.init +++ b/ctdb/config/ctdb.init @@ -92,8 +92,11 @@ start() { stop() { echo -n $"Shutting down ctdbd service: " ctdb shutdown - sleep 1 - killall -q -9 ctdbd + killall -q -0 ctdbd && { + # if it survived, give it 1 second then kill it with extreme prejudice + sleep 1 + killall -q -9 ctdbd + } RETVAL=$? case $init_style in suse) diff --git a/ctdb/config/events.d/50.samba b/ctdb/config/events.d/50.samba index cebe0aedf45..a833cb62066 100755 --- a/ctdb/config/events.d/50.samba +++ b/ctdb/config/events.d/50.samba @@ -37,6 +37,11 @@ case $cmd in # make sure samba is not already started service smb stop > /dev/null 2>&1 service winbind stop > /dev/null 2>&1 + killall -0 -q smbd winbindd && { + sleep 1 + # make absolutely sure samba is dead + killall -q -9 smbd winbindd + } # start Samba service. Start it reniced, as under very heavy load # the number of smbd processes will mean that it leaves few cycles for