SOURCES (AC-branch): nfsfs.init - check NFS4 setting in sysconfig

baggins baggins at pld-linux.org
Mon May 8 16:02:47 CEST 2006


Author: baggins                      Date: Mon May  8 14:02:47 2006 GMT
Module: SOURCES                       Tag: AC-branch
---- Log message:
- check NFS4 setting in sysconfig

---- Files affected:
SOURCES:
   nfsfs.init (1.18.2.3 -> 1.18.2.4) 

---- Diffs:

================================================================
Index: SOURCES/nfsfs.init
diff -u SOURCES/nfsfs.init:1.18.2.3 SOURCES/nfsfs.init:1.18.2.4
--- SOURCES/nfsfs.init:1.18.2.3	Mon May  8 15:53:48 2006
+++ SOURCES/nfsfs.init	Mon May  8 16:02:42 2006
@@ -40,20 +40,22 @@
 case "$1" in
   start)
   	if [ ! -f /var/lock/subsys/nfsfs ]; then
-	    if 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
+		if is_yes "$NFS4" ; then
+		    if 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
 		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
@@ -80,14 +82,16 @@
 		retry=$(($retry-1))
 	done
 	ok
-	if 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
+	if is_yes "$NFS4" ; then
+		if 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
 	fi
 	rm -f /var/lock/subsys/nfsfs
 	;;
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/nfsfs.init?r1=1.18.2.3&r2=1.18.2.4&f=u



More information about the pld-cvs-commit mailing list