aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2004-08-12 16:29:47 +0000
committerBill Nottingham <notting@redhat.com>2004-08-12 16:29:47 +0000
commit903bc93eec508359479d00b11a3e5331a414c40f (patch)
tree85fef7284b743517f6f1c847b7feac49d97c5993 /rc.d
parent4b2c27c22e4cf188c443ee1dac16c945c8123bf4 (diff)
downloadinitscripts-903bc93eec508359479d00b11a3e5331a414c40f.tar
initscripts-903bc93eec508359479d00b11a3e5331a414c40f.tar.gz
initscripts-903bc93eec508359479d00b11a3e5331a414c40f.tar.bz2
initscripts-903bc93eec508359479d00b11a3e5331a414c40f.tar.xz
initscripts-903bc93eec508359479d00b11a3e5331a414c40f.zip
fix nfs unmounting (#129765)
Diffstat (limited to 'rc.d')
-rwxr-xr-xrc.d/init.d/netfs4
-rwxr-xr-xrc.d/init.d/network2
2 files changed, 3 insertions, 3 deletions
diff --git a/rc.d/init.d/netfs b/rc.d/init.d/netfs
index a5469a5d..31a7762d 100755
--- a/rc.d/init.d/netfs
+++ b/rc.d/init.d/netfs
@@ -19,12 +19,12 @@
# Check that networking is up.
[ "${NETWORKING}" = "no" ] && exit 0
-NFSFSTAB=`LC_ALL=C awk '!/^#/ && $3 ~ /^nfs/ && $4 !~ /noauto/ { print $2 }' /etc/fstab`
+NFSFSTAB=`LC_ALL=C awk '!/^#/ && $3 ~ /^nfs/ && $3 != "nfsd" && $4 !~ /noauto/ { print $2 }' /etc/fstab`
SMBFSTAB=`LC_ALL=C awk '!/^#/ && $3 == "smbfs" && $4 !~ /noauto/ { print $2 }' /etc/fstab`
CIFSFSTAB=`LC_ALL=C awk '!/^#/ && $3 == "cifs" && $4 !~ /noauto/ { print $2 }' /etc/fstab`
NCPFSTAB=`LC_ALL=C awk '!/^#/ && $3 == "ncpfs" && $4 !~ /noauto/ { print $2 }' /etc/fstab`
NETDEVMTAB=`LC_ALL=C awk '!/^#/ && $4 ~ /_netdev/ && $2 != "/" { print $2 }' /proc/mounts`
-NFSMTAB=`LC_ALL=C awk '!/^#/ && $3 ~ /^nfs/ && $2 != "/" { print $2 }' /proc/mounts`
+NFSMTAB=`LC_ALL=C awk '!/^#/ && $3 ~ /^nfs/ && $3 != "nfsd" && $2 != "/" { print $2 }' /proc/mounts`
SMBMTAB=`LC_ALL=C awk '!/^#/ && $3 == "smbfs" { print $2 }' /proc/mounts`
CIFSMTAB=`LC_ALL=C awk '!/^#/ && $3 == "cifs" { print $2 }' /proc/mounts`
NCPMTAB=`LC_ALL=C awk '!/^#/ && $3 == "ncpfs" { print $2 }' /proc/mounts`
diff --git a/rc.d/init.d/network b/rc.d/init.d/network
index 3dbaaf50..80afd8fc 100755
--- a/rc.d/init.d/network
+++ b/rc.d/init.d/network
@@ -182,7 +182,7 @@ case "$1" in
# and unmount them even if the user didn't turn on netfs
if [ "$RUNLEVEL" = "6" -o "$RUNLEVEL" = "0" -o "$RUNLEVEL" = "1" ]; then
- NFSMTAB=`LC_ALL=C awk '!/^#/ && $3 == "nfs" { print $2 }' /proc/mounts`
+ NFSMTAB=`LC_ALL=C awk '!/^#/ && $3 ~ /^nfs/ { print $2 }' /proc/mounts`
SMBMTAB=`LC_ALL=C awk '!/^#/ && $3 == "smbfs" { print $2 }' /proc/mounts`
NCPMTAB=`LC_ALL=C awk '!/^#/ && $3 == "ncpfs" { print $2 }' /proc/mounts`
if [ -n "$NFSMTAB" -o -n "$SMBMTAB" -o -n "$NCPMTAB" ] ; then