aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--initscripts.spec2
-rwxr-xr-xrc.d/init.d/netfs21
-rwxr-xr-xrc.d/rc.sysinit2
3 files changed, 22 insertions, 3 deletions
diff --git a/initscripts.spec b/initscripts.spec
index ed2bb764..27ce1cbc 100644
--- a/initscripts.spec
+++ b/initscripts.spec
@@ -11,7 +11,7 @@ Requires: mingetty, /bin/awk, /bin/sed, mktemp, e2fsprogs >= 1.15
Requires: procps >= 2.0.7-7, sysklogd >= 1.3.31
Requires: setup >= 2.0.3, /sbin/fuser, which, /bin/grep
Requires: modutils >= 2.3.11-5
-Requires: util-linux >= 2.10s-11, mount >= 2.11g-4
+Requires: util-linux >= 2.10s-11, mount >= 2.11g-5
Requires: bash >= 2.0
Requires: /sbin/ip, /sbin/arping
Conflicts: kernel <= 2.2, timeconfig < 3.0, pppd < 2.3.9, wvdial < 1.40-3
diff --git a/rc.d/init.d/netfs b/rc.d/init.d/netfs
index ba5a0eb1..4ffed775 100755
--- a/rc.d/init.d/netfs
+++ b/rc.d/init.d/netfs
@@ -25,6 +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}'`
+NETDEVMTAB=`grep -v '^#' /proc/mounts | awk '{ if (($4 ~ /_netdev$/) && ($2 != "/")) 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}'`
@@ -63,7 +64,25 @@ case "$1" in
sig=-9
done
}
- action $"Unmounting network block filesystems: " umount -a -O netdev
+ [ -n "$NETDEVMTAB" ] && {
+ sig=
+ retry=3
+ while [ -n "$remaining" -a "$retry" -gt 0 ]
+ do
+ if [ "$retry" -lt 3 ]; then
+ action $"Unmounting network block filesystems (retry): " umount -a -O _netdev
+ else
+ action $"Unmounting network block filesystems: " umount -a -O _netdev
+ fi
+ sleep 2
+ remaining=`awk '!/^#/ && $4 ~ /_netdev/ && $2 != "/" {print $2}' /proc/mounts`
+ [ -z "$remaining" ] && break
+ /sbin/fuser -k -m $sig $remaining >/dev/null
+ sleep 5
+ retry=$(($retry - 1))
+ sig=-9
+ done
+ }
[ -n "$NFSMTAB" ] && {
sig=
retry=3
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index 4cd75e86..367f9891 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -540,7 +540,7 @@ fi
# Mount all other filesystems (except for NFS and /proc, which is already
# mounted). Contrary to standard usage,
# filesystems are NOT unmounted in single user mode.
-action $"Mounting local filesystems: " mount -a -t nonfs,smbfs,ncpfs -O nonetdev
+action $"Mounting local filesystems: " mount -a -t nonfs,smbfs,ncpfs -O no_netdev
# check remaining quotas other than root
if [ X"$_RUN_QUOTACHECK" = X1 -a -x /sbin/quotacheck ]; then