diff options
author | Martin Schwenke <martin@meltin.net> | 2010-11-18 14:34:48 +1100 |
---|---|---|
committer | Martin Schwenke <martin@meltin.net> | 2011-08-11 10:46:20 +1000 |
commit | e96e655430ece9caae0d7fd2714fa2924473b167 (patch) | |
tree | a2fb5123674cb730e555202153ef1e414857c3f9 | |
parent | 45bcf843ecf56269d3cc97b8f876c5fc09d4a87c (diff) | |
download | samba-e96e655430ece9caae0d7fd2714fa2924473b167.tar.gz samba-e96e655430ece9caae0d7fd2714fa2924473b167.tar.xz samba-e96e655430ece9caae0d7fd2714fa2924473b167.zip |
50.samba eventscript should use is_ctdb_managed_service "samba".
Currently it checks $CTDB_MANAGES_SAMBA directly. This doesn't work
when someone sets $CTDB_MANAGED_SERVICES directly.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit d8f0f8948abd340088720718fef7dc858661ba23)
-rwxr-xr-x | ctdb/config/events.d/50.samba | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ctdb/config/events.d/50.samba b/ctdb/config/events.d/50.samba index 76bb443bda..702f1920df 100755 --- a/ctdb/config/events.d/50.samba +++ b/ctdb/config/events.d/50.samba @@ -35,7 +35,7 @@ start_samba() { mkdir -p $CTDB_VARDIR/state/samba # make sure samba is not already started - [ "$CTDB_MANAGES_SAMBA" = "yes" ] && { + is_ctdb_managed_service "samba" && { service "$CTDB_SERVICE_SMB" stop > /dev/null 2>&1 service "$CTDB_SERVICE_NMB" stop > /dev/null 2>&1 killall -0 -q smbd && { @@ -75,7 +75,7 @@ start_samba() { # start Samba service. Start it reniced, as under very heavy load # the number of smbd processes will mean that it leaves few cycles for # anything else - [ "$CTDB_MANAGES_SAMBA" = "yes" ] && { + is_ctdb_managed_service "samba" && { net serverid wipe nice_service "$CTDB_SERVICE_NMB" start || { @@ -93,7 +93,7 @@ start_samba() { stop_samba() { # shutdown Samba when ctdb goes down - [ "$CTDB_MANAGES_SAMBA" = "yes" ] && { + is_ctdb_managed_service "samba" && { service "$CTDB_SERVICE_SMB" stop service "$CTDB_SERVICE_NMB" stop } @@ -245,7 +245,7 @@ case "$1" in touch $CTDB_VARDIR/state/samba/periodic_cleanup } - [ "$CTDB_MANAGES_SAMBA" = "yes" ] && { + is_ctdb_managed_service "samba" && { [ "$CTDB_SAMBA_SKIP_SHARE_CHECK" = "yes" ] || { testparm_background_update |