1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

Eventscripts: Change the default reconfigure action to do nothing

A default action of restarting the service doesn't obey the principle
of least surprise.  It cause the NFS service to be implicitly
reintroduced.

This allows no-op functions to be removed from some eventscripts and
service restart functions to be added to others.

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

(This used to be ctdb commit c75b5e5b4d000f5c7dab403df8238ceed390c1c0)
This commit is contained in:
Martin Schwenke 2012-12-04 15:00:44 +11:00 committed by Amitay Isaacs
parent 3d408ca1e1
commit 217ad07b72
5 changed files with 12 additions and 14 deletions

View File

@ -15,6 +15,11 @@ service_stop ()
service $service_name stop
}
service_reconfigure ()
{
service $service_name restart
}
service_fail_limit=2
service_tcp_ports=21

View File

@ -38,6 +38,11 @@ service_stop ()
killall -q -9 $service_name || true
}
service_reconfigure ()
{
service $service_name restart
}
loadconfig
ctdb_start_stop_service

View File

@ -31,12 +31,6 @@ service_stop ()
service "$CTDB_SERVICE_WINBIND" stop
}
service_reconfigure ()
{
# winbind automatically reloads config - no restart needed.
:
}
###########################
ctdb_start_stop_service

View File

@ -65,12 +65,6 @@ service_stop ()
fi
}
service_reconfigure ()
{
# Samba automatically reloads config - no restart needed.
:
}
# set default samba cleanup period - in minutes
[ -z "$SAMBA_CLEANUP_PERIOD" ] && {
SAMBA_CLEANUP_PERIOD=10

View File

@ -1125,10 +1125,10 @@ ctdb_service_reconfigure ()
ctdb_counter_init "$@"
}
# Default service_reconfigure() function.
# Default service_reconfigure() function does nothing.
service_reconfigure ()
{
service "${1:-$service_name}" restart
:
}
ctdb_reconfigure_try_lock ()