Author: baggins                      Date: Mon May  8 13:53:18 2006 GMT
Module: SOURCES                       Tag: AC-branch
---- Log message:
- killed NFSDTYPE checking:
        - userland nfsd has been obsolete for years now,
          besides we don't have it in AC
- added option to disable NFSv4 server daemons

---- Files affected:
SOURCES:
   nfs.init (1.22.2.2 -> 1.22.2.3) 

---- Diffs:

================================================================
Index: SOURCES/nfs.init
diff -u SOURCES/nfs.init:1.22.2.2 SOURCES/nfs.init:1.22.2.3
--- SOURCES/nfs.init:1.22.2.2   Mon May  8 14:20:24 2006
+++ SOURCES/nfs.init    Mon May  8 15:53:13 2006
@@ -37,6 +37,10 @@
 [ -x /usr/sbin/rpc.mountd ] || exit 0
 [ -f /etc/exports ] || exit 0
 
+if is_yes "$NFS4" ; then
+       RPCMOUNTOPTIONS="$RPCMOUNTOPTIONS --no-nfs-version 4"
+fi
+
 RETVAL=0
 # See how we were called.
 case "$1" in
@@ -44,25 +48,20 @@
        # Check if the service is already running?
        if [ ! -f /var/lock/subsys/nfs ]; then
                # Start daemons.
-               if [ "$NFSDTYPE" = "U" ]; then
-                       msg_starting "NFS mountd"
-                       daemon rpc.mountd $RPCMOUNTOPTIONS
-                       msg_starting "NFS daemon"
-                       daemon rpc.nfsd $RPCNFSDCOUNT
-               else
-                       modprobe -s nfsd > /dev/null 2>&1
-                       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 exportfs"
-                       daemon /usr/sbin/exportfs -r
-                       msg_starting "NFS mountd"
-                       daemon rpc.mountd $RPCMOUNTOPTIONS
+               modprobe -s nfsd > /dev/null 2>&1
+               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 exportfs"
+               daemon /usr/sbin/exportfs -r
+               msg_starting "NFS mountd"
+               daemon rpc.mountd $RPCMOUNTOPTIONS
+               if is_yes "$NFS4" ; then
                        if (grep -q rpc_pipefs /proc/filesystems); then
                            if [ ! -f /var/lock/subsys/idmapd ]; then
                                msg_starting "NFS idmapd"
@@ -72,9 +71,9 @@
                            msg_starting "NFS svcgssd"
                            daemon rpc.svcgssd $RPCSVCGSSOPTIONS
                        fi
-                       msg_starting "NFS daemon"
-                       daemon rpc.nfsd $RPCNFSDCOUNT
                fi
+               msg_starting "NFS daemon"
+               daemon rpc.nfsd $RPCNFSDCOUNT
                touch /var/lock/subsys/nfs
        else
                msg_already_running "NFS"
@@ -83,16 +82,11 @@
   stop)
        if [ -f /var/lock/subsys/nfs ]; then
                # Stop daemons.
-               if [ "$NFSDTYPE" = "U" ]; then
-                       msg_stopping "NFS mountd"
-                       killproc rpc.mountd
-                       msg_stopping "NFS daemon"
-                       killproc rpc.nfsd
-               else
-                       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"
+               killproc nfsd -QUIT
+               if is_yes "$NFS4" ; then
                        if (grep -q rpc_pipefs /proc/filesystems); then
                            msg_stopping "NFS svcgssd"
                            killproc rpc.svcgssd
@@ -102,9 +96,9 @@
                                rm -f /var/lock/subsys/idmapd
                            fi
                        fi
-                       msg_stopping "NFS"
-                       daemon /usr/sbin/exportfs -au
                fi
+               msg_stopping "NFS"
+               daemon /usr/sbin/exportfs -au
                rm -f /var/lock/subsys/nfs
        else
                msg_not_running "NFS"
@@ -113,11 +107,7 @@
   status)
        status rpc.mountd
        RETVAL=$?
-       if [ "$NFSDTYPE" = "U" ]; then
-               status rpc.nfsd
-       else
-               status nfsd
-       fi
+       status nfsd
        RET=$?
        [ $RETVAL -eq 0 ] && RETVAL=$RET
        ;;
@@ -127,15 +117,10 @@
        exit $?
        ;;
   force-reload)
-       if [ "$NFSDTYPE" = "U" ]; then
-               $0 restart
-       else
-               $0 reload
-       fi
+       $0 reload
        exit $?
        ;;
   reload)
-       [ "$NFSDTYPE" = "U" ] && exit 0
        if [ -f /var/lock/subsys/nfs ]; then
                msg_reloading "NFS"
                busy
@@ -148,7 +133,6 @@
        fi
        ;;
   probe)
-       [ "$NFSDTYPE" = "U" ] && exit 0
        if [ ! -f /var/lock/subsys/nfs ]; then
                echo start
                exit 0
================================================================

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

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

Reply via email to