events:50.samba: wipe the local part of the serverid db before starting winbind/smnd...
authorMichael Adam <obnox@samba.org>
Fri, 26 Mar 2010 16:33:51 +0000 (17:33 +0100)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Mon, 29 Mar 2010 05:56:48 +0000 (16:56 +1100)
This is necessary for the new serverid approach.

Michael

config/events.d/50.samba

index 5c10b19ef08b55adb8ed9d40f1daecc8241b1832..23dd060682a37c24dda2b0da86ee72fc386cd51b 100755 (executable)
@@ -53,7 +53,7 @@ start_samba() {
                }
        }
 
-       # restart the winbind service
+       # make sure winbind is not already started
        check_ctdb_manages_winbind
        [ "$CTDB_MANAGES_WINBIND" = "yes" ] && {
                service "$CTDB_SERVICE_WINBIND" stop > /dev/null 2>&1
@@ -62,6 +62,13 @@ start_samba() {
                    # make absolutely sure winbindd is dead
                    killall -q -9 winbindd
                }
+
+       }
+
+       /usr/bin/net serverid wipe
+
+       # start the winbind service
+       [ "$CTDB_MANAGES_WINBIND" = "yes" ] && {
                service "$CTDB_SERVICE_WINBIND" start
        }