mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
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)
This commit is contained in:
parent
469a5889de
commit
fd048a1771
@ -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"
|
||||
;;
|
||||
|
Loading…
Reference in New Issue
Block a user