SOURCES: nfsfs.init - nfs and nfs4 are different filesystems, so m...

baggins baggins at pld-linux.org
Mon Mar 19 19:41:06 CET 2007


Author: baggins                      Date: Mon Mar 19 18:41:06 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- nfs and nfs4 are different filesystems, so mount them separately

---- Files affected:
SOURCES:
   nfsfs.init (1.29 -> 1.30) 

---- Diffs:

================================================================
Index: SOURCES/nfsfs.init
diff -u SOURCES/nfsfs.init:1.29 SOURCES/nfsfs.init:1.30
--- SOURCES/nfsfs.init:1.29	Sun Mar 18 22:56:35 2007
+++ SOURCES/nfsfs.init	Mon Mar 19 19:41:01 2007
@@ -38,6 +38,7 @@
 
 start() {
   	if [ ! -f /var/lock/subsys/nfsfs ]; then
+		run_cmd "Mounting NFS filesystems" mount -a -t nfs
 		if is_yes "$NFS4" ; then
 		    if grep -q nfs4 /proc/filesystems; then
 			modprobe -s nfs > /dev/null 2>&1
@@ -56,10 +57,10 @@
 			    daemon rpc.gssd -m $RPCGSSOPTIONS
 			    [ $? -eq 0 ] && touch /var/lock/subsys/gssd
 			fi
+			run_cmd "Mounting NFSv4 filesystems" mount -a -t nfs4
 		    fi
 		fi
-	    run_cmd "Mounting NFS filesystems" mount -a -t nfs
-	    touch /var/lock/subsys/nfsfs
+		touch /var/lock/subsys/nfsfs
 	else
 	    msg_already_running "NFSFS"
 	fi
@@ -72,21 +73,21 @@
 		fsfile="/etc/mtab"
 	fi
 
-	show "Unmounting NFS filesystems"
-	busy
-	retry=3
-	remaining=$(awk '$3 == "nfs" {print $2}' $fsfile)
-	while [ -n "$remaining" -a $retry -gt 0 ]; do
-		fuser -msk -TERM `awk '$3 == "nfs" {print $2}' < $fsfile`
-		sleep 2
-		fuser -msk -KILL `awk '$3 == "nfs" {print $2}' < $fsfile`
-		umount -a -f -t nfs
-		remaining=$(awk '$3 == "nfs" {print $2}' $fsfile)
-		retry=$(($retry-1))
-	done
-	ok
 	if is_yes "$NFS4" ; then
 		if grep -q nfs4 /proc/filesystems; then
+		    show "Unmounting NFSv4 filesystems"
+		    busy
+		    retry=3
+		    remaining=$(awk '$3 == "nfs4" {print $2}' $fsfile)
+		    while [ -n "$remaining" -a $retry -gt 0 ]; do
+			fuser -msk -TERM `awk '$3 == "nfs4" {print $2}' < $fsfile`
+			sleep 2
+			fuser -msk -KILL `awk '$3 == "nfs4" {print $2}' < $fsfile`
+			umount -a -f -t nfs4
+			remaining=$(awk '$3 == "nfs4" {print $2}' $fsfile)
+			retry=$(($retry-1))
+		    done
+		    ok
 		    if [ -f /var/lock/subsys/gssd ]; then
 			msg_stopping "NFS gssd"
 			killproc rpc.gssd
@@ -99,6 +100,19 @@
 		    fi
 		fi
 	fi
+	show "Unmounting NFS filesystems"
+	busy
+	retry=3
+	remaining=$(awk '$3 == "nfs" {print $2}' $fsfile)
+	while [ -n "$remaining" -a $retry -gt 0 ]; do
+		fuser -msk -TERM `awk '$3 == "nfs" {print $2}' < $fsfile`
+		sleep 2
+		fuser -msk -KILL `awk '$3 == "nfs" {print $2}' < $fsfile`
+		umount -a -f -t nfs
+		remaining=$(awk '$3 == "nfs" {print $2}' $fsfile)
+		retry=$(($retry-1))
+	done
+	ok
 	rm -f /var/lock/subsys/nfsfs
 }
 
================================================================

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



More information about the pld-cvs-commit mailing list