summaryrefslogtreecommitdiffstats
path: root/ctdb/config
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2012-05-08 14:53:58 +1000
committerMartin Schwenke <martin@meltin.net>2012-05-11 10:33:27 +1000
commitfd048a1771e2a1d7fe28624e9c914836930c69f9 (patch)
treeead9e4d85692f434f32a154e63e2e4024121da62 /ctdb/config
parent469a5889de4ecd6842ab9a68f9637ca6750bc113 (diff)
downloadsamba-fd048a1771e2a1d7fe28624e9c914836930c69f9.tar.gz
samba-fd048a1771e2a1d7fe28624e9c914836930c69f9.tar.xz
samba-fd048a1771e2a1d7fe28624e9c914836930c69f9.zip
Eventscript functions: add optional version to nfs_check_rpc_service()
This can be optional because the 1st item of each action-triple is a test comparison that starts with '-'. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 1957d53b78f101cd0cd37d9705a225deef5174a2)
Diffstat (limited to 'ctdb/config')
-rwxr-xr-xctdb/config/functions12
1 files changed, 9 insertions, 3 deletions
diff --git a/ctdb/config/functions b/ctdb/config/functions
index ca89c38379..9c2898cca2 100755
--- a/ctdb/config/functions
+++ b/ctdb/config/functions
@@ -211,14 +211,20 @@ nfs_check_rpc_service ()
{
_prog_name="$1" ; shift
- _version=1
+ _v=""
+ case "$1" in
+ -*) : ;;
+ *) _v="$1" ; shift ;;
+ esac
+
+ _version=${_v:-1}
_rpc_prog="$_prog_name"
_restart=""
_opts=""
case "$_prog_name" in
knfsd)
_rpc_prog=nfs
- _version=3
+ _version=${_v:-3}
_restart="echo 'Trying to restart NFS service'"
_restart="${_restart}; startstop_nfs restart"
;;
@@ -230,7 +236,7 @@ nfs_check_rpc_service ()
;;
lockd)
_rpc_prog=nlockmgr
- _version=4
+ _version=${_v:-4}
_restart="echo 'Trying to restart lock manager service'"
_restart="${_restart}; startstop_nfslock restart"
;;