]> git.pld-linux.org Git - packages/nfs-utils.git/blobdiff - nfs.init
- started update to 1.1.0-rc1
[packages/nfs-utils.git] / nfs.init
index d0e97d18f7e3a49454f0a015086a57b05fe91310..62d2de781dbba46ee4e1d99237764675ce20e19c 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 60 20
+# chkconfig:   345 12 84
 # 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.
@@ -59,13 +59,15 @@ start() {
                                RPCMOUNTOPTIONS="$RPCMOUNTOPTIONS --no-nfs-version $vers"
                done
 
+               [ -n "$MOUNTD_PORT" ] && RPCMOUNTOPTIONS="$RPCMOUNTOPTIONS -p $MOUNTD_PORT"
+
                # Start daemons.
                msg_starting "NFS exportfs"
                daemon /usr/sbin/exportfs -r
-               msg_starting "NFS daemon"
-               daemon rpc.nfsd $RPCNFSDCOUNT
                msg_starting "NFS mountd"
                daemon rpc.mountd $RPCMOUNTOPTIONS
+               msg_starting "NFS daemon"
+               daemon rpc.nfsd $RPCNFSDCOUNT
                touch /var/lock/subsys/nfs
        else
                msg_already_running "NFS daemon"
@@ -75,10 +77,10 @@ start() {
 stop() {
        if [ -f /var/lock/subsys/nfs ]; then
                # Stop daemons.
-               msg_stopping "NFS mountd"
-               killproc rpc.mountd
                msg_stopping "NFS daemon"
                killproc nfsd -QUIT
+               msg_stopping "NFS mountd"
+               killproc rpc.mountd
                msg_stopping "NFS"
                daemon /usr/sbin/exportfs -au
                rm -f /var/lock/subsys/nfs
@@ -99,6 +101,8 @@ case "$1" in
   restart)
        stop
        start
+       /sbin/service idmapd status >/dev/null && /sbin/service idmapd restart
+       /sbin/service svcgssd status >/dev/null && /sbin/service svcgssd restart
        ;;
   reload|force-reload)
        if [ -f /var/lock/subsys/nfs ]; then
@@ -106,7 +110,13 @@ case "$1" in
                busy
                /usr/sbin/exportfs -r
                [ $? -ne 0 ] && RETVAL=7
-               [ $RETVAL -eq 0 ] && ok || died
+               if [ $RETVAL -eq 0 ]; then
+                       ok
+                       /sbin/service idmapd status >/dev/null && /sbin/service idmapd restart
+                       /sbin/service svcgssd status >/dev/null && /sbin/service svcgssd restart
+               else
+                       died
+               fi
        else
                msg_not_running "NFS"
                exit 7
@@ -131,8 +141,9 @@ case "$1" in
   status)
        echo "Configured NFS exports:"
        grep -v "^#" /etc/exports
+       echo
        echo "Active NFS exports:"
-       /usr/sbin/exportfs
+       /usr/sbin/exportfs -v
        echo
        status rpc.mountd
        RETVAL=$?
This page took 0.058779 seconds and 4 git commands to generate.