Author: baggins                      Date: Mon May  8 12:20:29 2006 GMT
Module: SOURCES                       Tag: AC-branch
---- Log message:
- merged NFSv4 support from HEAD

---- Files affected:
SOURCES:
   nfs.init (1.22.2.1 -> 1.22.2.2) , nfsfs.init (1.18 -> 1.18.2.1) 

---- Diffs:

================================================================
Index: SOURCES/nfs.init
diff -u SOURCES/nfs.init:1.22.2.1 SOURCES/nfs.init:1.22.2.2
--- SOURCES/nfs.init:1.22.2.1   Mon May  8 14:01:43 2006
+++ SOURCES/nfs.init    Mon May  8 14:20:24 2006
@@ -51,20 +51,27 @@
                        daemon rpc.nfsd $RPCNFSDCOUNT
                else
                        modprobe -s nfsd > /dev/null 2>&1
-                       if [ "$(kernelverser)" -ge "002006" ] ; then
-                               if grep -q nfsd /proc/filesystems && \
-                                   ! grep -q nfsd /proc/mounts; then
-                                       run_cmd "Mounting /proc/fs/nfsd 
filesystem" mount -t nfsd nfsd /proc/fs/nfsd
-                               fi
-                               if grep -q rpc_pipefs /proc/filesystems && \
-                                   ! grep -q rpc_pipefs /proc/mounts; then
-                                       run_cmd "Mounting rpc_pipefs 
filesystem" mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs
-                               fi
+                       if [ "$(kernelverser)" -ge "002006" ]; then
+                           grep -q nfsd /proc/filesystems && \
+                           ! grep -q nfsd /proc/mounts && \
+                               run_cmd "Mounting /proc/fs/nfsd filesystem" 
mount -t nfsd nfsd /proc/fs/nfsd
+                           grep -q rpc_pipefs /proc/filesystems && \
+                           ! grep -q rpc_pipefs /proc/mounts && \
+                               run_cmd "Mounting /var/lib/nfs/rpc_pipefs 
filesystem" mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs
                        fi
-                       msg_starting "NFS"
+                       msg_starting "NFS exportfs"
                        daemon /usr/sbin/exportfs -r
                        msg_starting "NFS mountd"
                        daemon rpc.mountd $RPCMOUNTOPTIONS
+                       if (grep -q rpc_pipefs /proc/filesystems); then
+                           if [ ! -f /var/lock/subsys/idmapd ]; then
+                               msg_starting "NFS idmapd"
+                               daemon rpc.idmapd $RPCIDMAPOPTIONS
+                               [ $? = 0 ] && touch /var/lock/subsys/idmapd
+                           fi
+                           msg_starting "NFS svcgssd"
+                           daemon rpc.svcgssd $RPCSVCGSSOPTIONS
+                       fi
                        msg_starting "NFS daemon"
                        daemon rpc.nfsd $RPCNFSDCOUNT
                fi
@@ -86,6 +93,15 @@
                        killproc rpc.mountd
                        msg_stopping "NFS daemon"
                        killproc nfsd -QUIT
+                       if (grep -q rpc_pipefs /proc/filesystems); then
+                           msg_stopping "NFS svcgssd"
+                           killproc rpc.svcgssd
+                           if [ -f /var/lock/subsys/idmapd -a ! -f 
/var/lock/subsys/nfsfs ]; then
+                               msg_stopping "NFS idmapd"
+                               killproc rpc.idmapd
+                               rm -f /var/lock/subsys/idmapd
+                           fi
+                       fi
                        msg_stopping "NFS"
                        daemon /usr/sbin/exportfs -au
                fi
@@ -125,7 +141,7 @@
                busy
                /usr/sbin/exportfs
                [ $? -ne 0 ] && RETVAL=7
-               [ $RETVAL -eq 0 ] && ok || died 
+               [ $RETVAL -eq 0 ] && ok || died
        else
                msg_not_running "NFS" >&2
                exit 7

================================================================
Index: SOURCES/nfsfs.init
diff -u SOURCES/nfsfs.init:1.18 SOURCES/nfsfs.init:1.18.2.1
--- SOURCES/nfsfs.init:1.18     Mon Sep  6 11:14:59 2004
+++ SOURCES/nfsfs.init  Mon May  8 14:20:24 2006
@@ -37,8 +37,26 @@
 # See how we were called.
 case "$1" in
   start)
-       run_cmd "Mounting NFS filesystems" mount -a -t nfs
-       touch /var/lock/subsys/nfsfs
+       if [ ! -f /var/lock/subsys/nfsfs ]; then
+           if [ "$NFSDTYPE" != "U" ] && grep -q nfs4 /proc/filesystems; then
+               modprobe -s nfs > /dev/null 2>&1
+               if [ "$(kernelverser)" -ge "002006" ]; then
+                   grep -q rpc_pipefs /proc/filesystems && \
+                   ! grep -q rpc_pipefs /proc/mounts && \
+                   run_cmd "Mounting /var/lib/nfs/rpc_pipefs filesystem" mount 
-t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs
+               fi
+               if [ ! -f /var/lock/subsys/idmapd ]; then
+                   msg_starting "NFS idmapd"
+                   daemon rpc.idmapd $RPCIDMAPOPTIONS
+               fi
+               msg_starting "NFS gssd"
+               daemon rpc.gssd -m $RPCGSSOPTIONS
+           fi
+           run_cmd "Mounting NFS filesystems" mount -a -t nfs
+           touch /var/lock/subsys/nfsfs
+       else
+           msg_already_running "NFSFS"
+       fi
        ;;
   stop)
        if [ -f /proc/mounts ]; then
@@ -60,6 +78,15 @@
                retry=$(($retry-1))
        done
        ok
+       if [ "$NFSDTYPE" != "U" ] && grep -q nfs4 /proc/filesystems; then
+           msg_stopping "NFS gssd"
+           killproc rpc.gssd
+           if [ -f /var/lock/subsys/idmapd -a ! -f /var/lock/subsys/nfs ]; then
+               msg_stopping "NFS idmapd"
+               killproc rpc.idmapd
+               rm -f /var/lock/subsys/idmapd
+           fi
+       fi
        rm -f /var/lock/subsys/nfsfs
        ;;
   status)
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/nfs.init?r1=1.22.2.1&r2=1.22.2.2&f=u
    http://cvs.pld-linux.org/SOURCES/nfsfs.init?r1=1.18&r2=1.18.2.1&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to