50.samba eventscript should stop/start services when they become (un)managed.
authorMartin Schwenke <martin@meltin.net>
Thu, 18 Nov 2010 00:04:52 +0000 (11:04 +1100)
committerMartin Schwenke <martin@meltin.net>
Thu, 11 Aug 2011 00:46:20 +0000 (10:46 +1000)
commit45bcf843ecf56269d3cc97b8f876c5fc09d4a87c
tree7e52bb93dcbbf0277a12360cb48cc9bc9794a20a
parent21226ee73808e7fe0d8253a9d906e44e2f47caf9
50.samba eventscript should stop/start services when they become (un)managed.

When the value of $CTDB_MANAGES_SAMBA or $CTDB_MANAGES_WINBIND (or
corresponding changes are made to $CTDB_MANAGED_VERSIONS), the
associated service should be started or stopped as necessary.

This add calls to ctdb_start_stop_service() to manage
starting/stopping samba and winbind.

An associated cleanup is made to the initial checks that one of
$CTDB_MANAGES_SAMBA or $CTDB_MANAGES_WINBIND is set, replacing them
with calls to is_ctdb_managed_service().

To handle the winbind cases ctdb_start_stop_service() and
is_ctdb_managed_service() are updated to take an optional service name
parameter.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Conflicts:

config/events.d/50.samba

Most of this merged elsewhere.  This just removes a check that
this is the monitor event.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 257a2e350280c0b76ed2fac588cad167381fda52)
ctdb/config/events.d/50.samba