]> git.pld-linux.org Git - packages/nfs-utils.git/blobdiff - nfs.init
- use generic portmapper check from rc-scripts
[packages/nfs-utils.git] / nfs.init
index 62d2de781dbba46ee4e1d99237764675ce20e19c..0da6062e1f467d2d9646c2c351f8981f3c2033ae 100644 (file)
--- a/nfs.init
+++ b/nfs.init
@@ -3,7 +3,7 @@
 # nfs          This shell script takes care of starting and stopping
 #              the NFS services.
 #
-# chkconfig:   345 12 84
+# chkconfig:   345 13 81
 # description: NFS is a popular protocol for file sharing across TCP/IP \
 #              networks. This service provides NFS server functionality, \
 #              which is configured via the /etc/exports file.
@@ -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() {
@@ -101,7 +101,7 @@ case "$1" in
   restart)
        stop
        start
-       /sbin/service idmapd status >/dev/null && /sbin/service idmapd restart
+       /sbin/service idmapd status >/dev/null && /sbin/service idmapd reload
        /sbin/service svcgssd status >/dev/null && /sbin/service svcgssd restart
        ;;
   reload|force-reload)
@@ -112,7 +112,7 @@ case "$1" in
                [ $? -ne 0 ] && RETVAL=7
                if [ $RETVAL -eq 0 ]; then
                        ok
-                       /sbin/service idmapd status >/dev/null && /sbin/service idmapd restart
+                       /sbin/service idmapd status >/dev/null && /sbin/service idmapd reload
                        /sbin/service svcgssd status >/dev/null && /sbin/service svcgssd restart
                else
                        died
This page took 0.029474 seconds and 4 git commands to generate.