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)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Thu, 18 Nov 2010 01:05:47 +0000 (12:05 +1100)
commit92bcf1c475d8497e08a0babf7a7b3434dade7208
tree0d9ee4d3a47b664416e65de2f05fac07330f5a94
parentd0b790de08b9c9226ac9848b434a051d99a41dd8
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>
config/events.d/50.samba
config/functions