]> git.pld-linux.org Git - packages/nfs-utils.git/commitdiff
- start mountd before nfsd, from Neil Brown:
authorJan Rękorajski <baggins@pld-linux.org>
Thu, 29 Mar 2007 12:57:56 +0000 (12:57 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
  - mountd should start before nfsd.
  - mountd:
provides "is this exported" service to nfsd.  If it isn't running
when the first nfs request arrives, it might be rejected
incorrectly.  This is probably the second most important
dependency.
- start/restart svcgssd also (looks like it can misbehave just like idmapd)

Changed files:
    nfs.init -> 1.43

nfs.init

index a2f9fb1a931bec84b3792e0be736e0bc5f311c47..62d2de781dbba46ee4e1d99237764675ce20e19c 100644 (file)
--- a/nfs.init
+++ b/nfs.init
@@ -64,10 +64,10 @@ start() {
                # 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"
@@ -77,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
@@ -102,6 +102,7 @@ case "$1" in
        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
@@ -109,8 +110,13 @@ case "$1" in
                busy
                /usr/sbin/exportfs -r
                [ $? -ne 0 ] && RETVAL=7
-               [ $RETVAL -eq 0 ] && ok || died
-               /sbin/service idmapd status >/dev/null && /sbin/service idmapd restart
+               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
This page took 0.183631 seconds and 4 git commands to generate.