50.samba
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Tue, 14 Dec 2010 10:17:14 +0000 (21:17 +1100)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Tue, 14 Dec 2010 10:17:14 +0000 (21:17 +1100)
Net serverid wipe can take a bit of time sometimes so background it.

Only perform auto start/stop of the managed service on the monitor event

config/events.d/50.samba

index 17d23360782a53acf98d80c4340e3eb81a7dc16b..c4637c0427ca8a824e424ad9b1497ad26cdd8477 100755 (executable)
@@ -72,7 +72,7 @@ start_samba() {
        # the number of smbd processes will mean that it leaves few cycles for
        # anything else
        [ "$CTDB_MANAGES_SAMBA" = "yes" ] && {
-               /usr/bin/net serverid wipe
+               /usr/bin/net serverid wipe &
 
                nice_service "$CTDB_SERVICE_NMB" start
                nice_service "$CTDB_SERVICE_SMB" start
@@ -206,7 +206,7 @@ periodic_cleanup() {
 
 ###########################
 
-[ "$1" = "init" ] || {
+[ "$1" = "monitor" ] && {
 ctdb_start_stop_service
 ctdb_start_stop_service "winbind"
 }