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

eventscripts: Move rpc.statd existence check into nfs_check_rpc_service ()

The code in 60.nfs is going to be genericised, so make all the checks
look the same.

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

(This used to be ctdb commit 15b0f78cbf8d6ba481b7eba9e4fe3f4270214c72)
This commit is contained in:
Martin Schwenke 2013-04-23 05:54:12 +10:00
parent 6c347a5294
commit 577a3cae5d
2 changed files with 10 additions and 10 deletions

View File

@ -78,16 +78,10 @@ case "$1" in
update_tickles 2049
# check that statd responds to rpc requests
# if statd is not running we try to restart it
# we only do this IF we have a rpc.statd command.
# For platforms where rpc.statd does not exist, we skip
# the check completely
p="rpc.statd"
which $p >/dev/null 2>/dev/null && \
nfs_check_rpc_service "statd" \
-ge 6 "verbose unhealthy" \
-eq 4 "verbose restart" \
-eq 2 "restart:bs"
nfs_check_rpc_service "statd" \
-ge 6 "verbose unhealthy" \
-eq 4 "verbose restart" \
-eq 2 "restart:bs"
# check that NFS responds to rpc requests
if [ "$CTDB_NFS_SKIP_KNFSD_ALIVE_CHECK" != "yes" ] ; then

View File

@ -223,6 +223,12 @@ nfs_check_rpc_service ()
{
_prog_name="$1" ; shift
# Some platforms don't have separate programs for all services.
case "$_prog_name" in
statd)
which "rpc.${_prog_name}" >/dev/null 2>&1 || return 0
esac
_v=""
case "$1" in
-*) : ;;