Rev 621: ensure smbd and winbindd do die in 50.samba in http://samba.org/~tridge/ctdb

tridge at samba.org tridge at samba.org
Thu Sep 13 04:36:23 GMT 2007


------------------------------------------------------------
revno: 621
revision-id: tridge at samba.org-20070913043623-p9j44tz2hl17vx7u
parent: tridge at samba.org-20070913040818-8zksju5tedjiftha
committer: Andrew Tridgell <tridge at samba.org>
branch nick: tridge.test2
timestamp: Thu 2007-09-13 14:36:23 +1000
message:
  ensure smbd and winbindd do die in 50.samba
modified:
  config/ctdb.init               ctdb.init-20070527204758-biuh7znabuwan3zn-6
  config/events.d/50.samba       samba-20070601105340-vlcvnp6euoj3zdwy-3
=== modified file 'config/ctdb.init'
--- a/config/ctdb.init	2007-09-12 03:26:24 +0000
+++ b/config/ctdb.init	2007-09-13 04:36:23 +0000
@@ -92,8 +92,11 @@
 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)

=== modified file 'config/events.d/50.samba'
--- a/config/events.d/50.samba	2007-08-16 01:34:35 +0000
+++ b/config/events.d/50.samba	2007-09-13 04:36:23 +0000
@@ -37,6 +37,11 @@
 	# 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



More information about the samba-cvs mailing list