diff options
author | Bill Nottingham <notting@redhat.com> | 2000-07-31 19:42:02 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2000-07-31 19:42:02 +0000 |
commit | 74660e34f1f4ecd93e0d6523957616e094841db8 (patch) | |
tree | f464e27f93bb87fef61e4a0f6db97b48c1e060f5 /rc.d/init.d/netfs | |
parent | ddb1552431dbbcef8abdc147200ec4fc2b087c3e (diff) | |
download | initscripts-74660e34f1f4ecd93e0d6523957616e094841db8.tar initscripts-74660e34f1f4ecd93e0d6523957616e094841db8.tar.gz initscripts-74660e34f1f4ecd93e0d6523957616e094841db8.tar.bz2 initscripts-74660e34f1f4ecd93e0d6523957616e094841db8.tar.xz initscripts-74660e34f1f4ecd93e0d6523957616e094841db8.zip |
don't unmount / in netfs
Diffstat (limited to 'rc.d/init.d/netfs')
-rwxr-xr-x | rc.d/init.d/netfs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/rc.d/init.d/netfs b/rc.d/init.d/netfs index 39e6ef76..6e80e0ea 100755 --- a/rc.d/init.d/netfs +++ b/rc.d/init.d/netfs @@ -25,7 +25,7 @@ fi NFSFSTAB=`grep -v '^#' /etc/fstab | awk '{ if ($3 ~ /^nfs$/ && $4 !~ /noauto/) print $2}'` SMBFSTAB=`grep -v '^#' /etc/fstab | awk '{ if ($3 ~ /^smbfs$/ && $4 !~ /noauto/) print $2}'` NCPFSTAB=`grep -v '^#' /etc/fstab | awk '{ if ($3 ~ /^ncpfs$/ && $4 !~ /noauto/) print $2}'` -NFSMTAB=`grep -v '^#' /proc/mounts | awk '{ if ($3 ~ /^nfs$/ ) print $2}'` +NFSMTAB=`grep -v '^#' /proc/mounts | awk '{ if (($3 ~ /nfs$/) && ($2 != "/")) print $2}'` SMBMTAB=`grep -v '^#' /proc/mounts | awk '{ if ($3 ~ /^smbfs$/ ) print $2}'` NCPMTAB=`grep -v '^#' /proc/mounts | awk '{ if ($3 ~ /^ncpfs$/ ) print $2}'` @@ -36,13 +36,13 @@ case "$1" in [ -n "$SMBFSTAB" ] && action "Mounting SMB filesystems" mount -a -t smbfs [ -n "$NCPFSTAB" ] && action "Mounting NCP filesystems" mount -a -t ncpfs touch /var/lock/subsys/netfs - action "Mounting other filesystems" mount -a -t nonfs,smbfs,ncpfs + action "Mounting other filesystems" mount -a -t noproc,nonfs,smbfs,ncpfs ;; stop) [ -n "$NFSMTAB" ] && { sig= retry=3 - remaining=`awk '!/^#/ && $3 ~ /^nfs/ {print $2}' /proc/mounts` + remaining=`awk '!/^#/ && $3 ~ /^nfs/ && $2 != "/" {print $2}' /proc/mounts` while [ -n "$remaining" -a "$retry" -gt 0 ] do if [ "$retry" -lt 3 ]; then @@ -51,7 +51,7 @@ case "$1" in action "Unmounting NFS filesystems" umount -f -a -t nfs fi sleep 2 - remaining=`awk '!/^#/ && $3 ~ /^nfs/ {print $2}' /proc/mounts` + remaining=`awk '!/^#/ && $3 ~ /^nfs/ && $2 != "/" {print $2}' /proc/mounts` [ -z "$remaining" ] && break /sbin/fuser -k -m $sig $remaining >/dev/null sleep 5 |