]> git.pld-linux.org Git - packages/nfs-utils.git/commitdiff
- nfs and nfs4 are different filesystems, so mount them separately
authorJan Rękorajski <baggins@pld-linux.org>
Mon, 19 Mar 2007 18:41:01 +0000 (18:41 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    nfsfs.init -> 1.30

nfsfs.init

index 919319bab2a8c089e0a080dcf3fe62b9c4e8a925..1e2771eab97124f2101bc13e6f5e2a711dd76fcb 100644 (file)
@@ -38,6 +38,7 @@ fi
 
 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 @@ start() {
                            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 @@ stop() {
                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 @@ stop() {
                    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
 }
 
This page took 0.070247 seconds and 4 git commands to generate.