aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>1999-09-29 20:21:20 +0000
committerBill Nottingham <notting@redhat.com>1999-09-29 20:21:20 +0000
commit18294313010d07a99e035d86a6086867327e1799 (patch)
treec0448b84b7a78d5f429247a8a0f36cb27264a43b /rc.d
parentbcfa040e8106209e3b83cb2026052ccf68e0e30a (diff)
downloadinitscripts-18294313010d07a99e035d86a6086867327e1799.tar
initscripts-18294313010d07a99e035d86a6086867327e1799.tar.gz
initscripts-18294313010d07a99e035d86a6086867327e1799.tar.bz2
initscripts-18294313010d07a99e035d86a6086867327e1799.tar.xz
initscripts-18294313010d07a99e035d86a6086867327e1799.zip
add an extra awk check to make sure we omit root fs.
Diffstat (limited to 'rc.d')
-rwxr-xr-xrc.d/init.d/halt4
1 files changed, 2 insertions, 2 deletions
diff --git a/rc.d/init.d/halt b/rc.d/init.d/halt
index 7c7fbf70..8fd08c6d 100755
--- a/rc.d/init.d/halt
+++ b/rc.d/init.d/halt
@@ -65,7 +65,7 @@ SWAPS=`awk '! /^Filename/ { print $1 }' /proc/swaps`
# Unmount file systems, killing processes if we have to.
sig=
retry=3
-remaining=`awk '!/(^#|proc|^none|^\/dev\/root)/ {print $2}' /proc/mounts`
+remaining=`awk '!/(^#|proc|^none|^\/dev\/root| \/ )/ {print $2}' /proc/mounts`
while [ -n "$remaining" -a "$retry" -gt 0 ]
do
if [ "$retry" -lt 3 ]; then
@@ -74,7 +74,7 @@ do
runcmd "Unmounting file systems" umount -a -f -t noproc
fi
sleep 2
- remaining=`awk '!/(^#|proc|^none|^\/dev\/root)/ {print $2}' /proc/mounts`
+ remaining=`awk '!/(^#|proc|^none|^\/dev\/root| \/ )/ {print $2}' /proc/mounts`
[ -z "$remaining" ] && break
/sbin/fuser -k -m $sig $remaining >/dev/null
sleep 5