aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/init.d/halt
diff options
context:
space:
mode:
authorMiloslav Trmac <mitr@volny.cz>2006-07-30 03:07:49 +0000
committerMiloslav Trmac <mitr@volny.cz>2006-07-30 03:07:49 +0000
commita3ec6a0c61c899499c8261c7bea0acc13f2d2011 (patch)
tree90ab19b82e58418e8605dcd70f2a2869701764bf /rc.d/init.d/halt
parentbbac679b927aa70719e23ee96929a1f7357be5a2 (diff)
downloadinitscripts-a3ec6a0c61c899499c8261c7bea0acc13f2d2011.tar
initscripts-a3ec6a0c61c899499c8261c7bea0acc13f2d2011.tar.gz
initscripts-a3ec6a0c61c899499c8261c7bea0acc13f2d2011.tar.bz2
initscripts-a3ec6a0c61c899499c8261c7bea0acc13f2d2011.tar.xz
initscripts-a3ec6a0c61c899499c8261c7bea0acc13f2d2011.zip
Use /proc/mounts instead of /etc/mtab (via mount), to handle mount --rbind
(#198426)
Diffstat (limited to 'rc.d/init.d/halt')
-rwxr-xr-xrc.d/init.d/halt6
1 files changed, 4 insertions, 2 deletions
diff --git a/rc.d/init.d/halt b/rc.d/init.d/halt
index ba3c3b35..be8fd559 100755
--- a/rc.d/init.d/halt
+++ b/rc.d/init.d/halt
@@ -178,8 +178,10 @@ LANG=C __umount_loop '$2 ~ /^\/$|^\/proc|^\/dev/{next}
# remove the crash indicator flag
rm -f /.autofsck
-# Try all file systems other than root and RAM disks, one last time.
-mount | awk '!/( \/ |^\/dev\/root|^\/dev\/ram| \/proc )/ { print $3 }' | sort -r | \
+# Try all file systems other than root, essential filesystems and RAM disks,
+# one last time.
+awk '$2 !~ /\/(|dev|proc|selinux)$/ && $1 !~ /^\/dev\/ram/ { print $2 }' \
+ /proc/mounts | sort -r | \
while read line; do
fstab-decode umount -f $line
done