diff options
-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 |