Eventscript argument cleanups and introduction of ctdb_standard_event_handler.
authorMartin Schwenke <martin@meltin.net>
Tue, 1 Dec 2009 06:43:47 +0000 (17:43 +1100)
committerMartin Schwenke <martin@meltin.net>
Tue, 1 Dec 2009 06:43:47 +0000 (17:43 +1100)
commit3d55408cbbb3bb71670b80f3dad5639ea0be5b5b
treeb0952c65b1e6aea8c6959f05cff4105b87ef2f43
parenta1f37fdc5217e57d2d643d77a811afca747685e0
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>
17 files changed:
config/ctdb.init
config/events.d/00.ctdb
config/events.d/01.reclock
config/events.d/10.interface
config/events.d/11.natgw [changed mode: 0644->0755]
config/events.d/11.routing
config/events.d/20.multipathd [changed mode: 0644->0755]
config/events.d/31.clamd [changed mode: 0644->0755]
config/events.d/40.vsftpd
config/events.d/41.httpd
config/events.d/50.samba
config/events.d/60.nfs
config/events.d/61.nfstickle
config/events.d/70.iscsi
config/events.d/91.lvs
config/events.d/99.timeout
config/functions