From fcdc7f4e2fc23cec363efcc7ce51ce50141d5e43 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20R=C4=99korajski?= Date: Thu, 26 Apr 2007 22:19:06 +0000 Subject: [PATCH] - use generic portmapper check from rc-scripts Changed files: nfs.init -> 1.47 nfsfs.init -> 1.38 nfslock.init -> 1.20 rpcgssd.init -> 1.8 rpcidmapd.init -> 1.13 rpcsvcgssd.init -> 1.11 rquotad.init -> 1.19 --- nfs.init | 4 ++-- nfsfs.init | 4 ++-- nfslock.init | 4 ++-- rpcgssd.init | 4 ++-- rpcidmapd.init | 4 ++-- rpcsvcgssd.init | 4 ++-- rquotad.init | 5 ++--- 7 files changed, 14 insertions(+), 15 deletions(-) diff --git a/nfs.init b/nfs.init index 3c115bf..0da6062 100644 --- a/nfs.init +++ b/nfs.init @@ -34,8 +34,8 @@ else exit 0 fi -if [ -x /sbin/pidof ] && [ "$1" != "stop" ]; then - [ -z "`/sbin/pidof portmap`" ] && nls "Error: portmap isn't running" && exit 0 +if [ "$1" != "stop" ]; then + check_portmapper || { nls "Error: portmap isn't running" && exit 0; } fi start() { diff --git a/nfsfs.init b/nfsfs.init index 6168d19..d256091 100644 --- a/nfsfs.init +++ b/nfsfs.init @@ -31,8 +31,8 @@ else exit 0 fi -if [ -x /sbin/pidof ] && [ "$1" != "stop" ]; then - [ -z "`/sbin/pidof portmap`" ] && nls "Error: portmap isn't running" && exit 0 +if [ "$1" != "stop" ]; then + check_portmapper || { nls "Error: portmap isn't running" && exit 0; } fi start() { diff --git a/nfslock.init b/nfslock.init index 609cb89..0636334 100644 --- a/nfslock.init +++ b/nfslock.init @@ -30,8 +30,8 @@ else exit 0 fi -if [ -x /sbin/pidof ] && [ "$1" != "stop" ]; then - [ -z "`/sbin/pidof portmap`" ] && nls "Error: portmap isn't running" && exit 0 +if [ "$1" != "stop" ]; then + check_portmapper || { nls "Error: portmap isn't running" && exit 0; } fi # /usr may be on NFS, fail silently, nfsfs will start it diff --git a/rpcgssd.init b/rpcgssd.init index 4d67756..803882c 100644 --- a/rpcgssd.init +++ b/rpcgssd.init @@ -22,8 +22,8 @@ else exit 0 fi -if [ -x /sbin/pidof ] && [ "$1" != "stop" ]; then - [ -z "`/sbin/pidof portmap`" ] && nls "Error: portmap isn't running" && exit 0 +if [ "$1" != "stop" ]; then + check_portmapper || { nls "Error: portmap isn't running" && exit 0; } fi # Get service config diff --git a/rpcidmapd.init b/rpcidmapd.init index 2986980..eda321a 100644 --- a/rpcidmapd.init +++ b/rpcidmapd.init @@ -22,8 +22,8 @@ else exit 0 fi -if [ -x /sbin/pidof ] && [ "$1" != "stop" ]; then - [ -z "`/sbin/pidof portmap`" ] && nls "Error: portmap isn't running" && exit 0 +if [ "$1" != "stop" ]; then + check_portmapper || { nls "Error: portmap isn't running" && exit 0; } fi # Get service config diff --git a/rpcsvcgssd.init b/rpcsvcgssd.init index 2f63c9a..4c634bf 100644 --- a/rpcsvcgssd.init +++ b/rpcsvcgssd.init @@ -22,8 +22,8 @@ else exit 0 fi -if [ -x /sbin/pidof ] && [ "$1" != "stop" ]; then - [ -z "`/sbin/pidof portmap`" ] && nls "Error: portmap isn't running" && exit 0 +if [ "$1" != "stop" ]; then + check_portmapper || { nls "Error: portmap isn't running" && exit 0; } fi # Get service config diff --git a/rquotad.init b/rquotad.init index ccefaff..1bfadb1 100644 --- a/rquotad.init +++ b/rquotad.init @@ -29,9 +29,8 @@ else exit 0 fi -if [ -x /sbin/pidof ] && [ "$1" != "stop" ] && [ -z "`/sbin/pidof portmap`" ]; then - echo "Error: portmap isn't running" - exit 0 +if [ "$1" != "stop" ]; then + check_portmapper || { nls "Error: portmap isn't running" && exit 0; } fi start() { -- 2.44.0