mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
519564bb35
This is unnecessary in Samba >= 4.0 because winbindd monitors IP address itself and no longer needs to be told when they are dropped. The smbcontrol commands can hang if a node has recovery mode active because smbcontrol is unable to connect to the registry. Therefore, the smbcontrol commands should be removed. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11719 Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Wed Feb 10 14:08:17 CET 2016 on sn-devel-144
64 lines
953 B
Bash
Executable File
64 lines
953 B
Bash
Executable File
#!/bin/sh
|
|
# ctdb event script for winbind
|
|
|
|
[ -n "$CTDB_BASE" ] || \
|
|
export CTDB_BASE=$(cd -P $(dirname "$0") ; dirname "$PWD")
|
|
|
|
. $CTDB_BASE/functions
|
|
|
|
detect_init_style
|
|
|
|
CTDB_SERVICE_WINBIND=${CTDB_SERVICE_WINBIND:-winbind}
|
|
|
|
service_name="winbind"
|
|
|
|
loadconfig
|
|
|
|
ctdb_setup_service_state_dir
|
|
|
|
service_start ()
|
|
{
|
|
service "$CTDB_SERVICE_WINBIND" stop >/dev/null 2>&1
|
|
killall -0 -q winbindd && {
|
|
sleep 1
|
|
# make absolutely sure winbindd is dead
|
|
killall -q -9 winbindd
|
|
}
|
|
|
|
service "$CTDB_SERVICE_WINBIND" start || \
|
|
die "Failed to start winbind"
|
|
}
|
|
|
|
service_stop ()
|
|
{
|
|
service "$CTDB_SERVICE_WINBIND" stop
|
|
}
|
|
|
|
###########################
|
|
|
|
ctdb_start_stop_service
|
|
|
|
is_ctdb_managed_service || exit 0
|
|
|
|
###########################
|
|
|
|
case "$1" in
|
|
startup)
|
|
ctdb_service_start
|
|
;;
|
|
|
|
shutdown)
|
|
ctdb_service_stop
|
|
;;
|
|
|
|
monitor)
|
|
ctdb_check_command wbinfo -p
|
|
;;
|
|
|
|
*)
|
|
ctdb_standard_event_handler "$@"
|
|
;;
|
|
esac
|
|
|
|
exit 0
|