diff options
author | Martin Schwenke <martin@meltin.net> | 2009-12-01 17:43:47 +1100 |
---|---|---|
committer | Martin Schwenke <martin@meltin.net> | 2009-12-01 17:43:47 +1100 |
commit | db25ca69e56ea7d8808e1ace9d9cc28a611aab0c (patch) | |
tree | fdff0d00aa1d438d0b1dce8c1025884e71f7294c /ctdb/config/events.d/40.vsftpd | |
parent | ad431c352004c0fdf4714919872cac043e1618dc (diff) | |
download | samba-db25ca69e56ea7d8808e1ace9d9cc28a611aab0c.tar.gz |
Eventscript argument cleanups and introduction of ctdb_standard_event_handler.
The functions file no longer causes a side-effect by doing a shift.
It also doesn't set a convenience variable for $1.
All eventscripts now explicitly use "$1" in their case statement, as
does the initscript. The absence of a shift means that the
takeip/releaseip events now explicitly reference $2-$4 rather than
$1-$3.
New function ctdb_standard_event_handler handles the status and
setstatus events, and exits for either of those events. It is called
via a default case in each eventscript, replacing an explicit status
case where applicable.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 3d55408cbbb3bb71670b80f3dad5639ea0be5b5b)
Diffstat (limited to 'ctdb/config/events.d/40.vsftpd')
-rwxr-xr-x | ctdb/config/events.d/40.vsftpd | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ctdb/config/events.d/40.vsftpd b/ctdb/config/events.d/40.vsftpd index 582604aae36..7ca7ba86332 100755 --- a/ctdb/config/events.d/40.vsftpd +++ b/ctdb/config/events.d/40.vsftpd @@ -17,20 +17,20 @@ ctdb_start_stop_service is_ctdb_managed_service || exit 0 -case $cmd in - startup) +case "$1" in + startup) ctdb_service_start ;; - shutdown) + shutdown) ctdb_service_stop ;; - takeip|releaseip) + takeip|releaseip) ctdb_service_set_reconfigure ;; - recovered) + recovered) # if we have taken or released any ips we must # restart vsftpd to ensure that all tcp connections are reset if ctdb_service_needs_reconfigure ; then @@ -38,7 +38,7 @@ case $cmd in fi ;; - monitor) + monitor) if ctdb_service_needs_reconfigure ; then ctdb_service_reconfigure exit 0 @@ -55,8 +55,8 @@ case $cmd in fi ;; - status) - ctdb_checkstatus || exit $? + *) + ctdb_standard_event_handler "$@" ;; esac |