]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ensure smbd and winbindd do die in 50.samba
authorAndrew Tridgell <tridge@samba.org>
Thu, 13 Sep 2007 04:36:23 +0000 (14:36 +1000)
committerAndrew Tridgell <tridge@samba.org>
Thu, 13 Sep 2007 04:36:23 +0000 (14:36 +1000)
(This used to be ctdb commit 6f23affedb626fc7a5ca86c4763f3045a5586231)

ctdb/config/ctdb.init
ctdb/config/events.d/50.samba

index 06ba285edf1f6b0f185fb52d64e61c96feda2d80..4f8b61b7bc0887b88a62463d1f0b6eabf4370cad 100755 (executable)
@@ -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)
index cebe0aedf450326abd4c20cdfba07232dc0a613e..a833cb620662a11383e773222d89c4fd554599d5 100755 (executable)
@@ -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