aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d
diff options
context:
space:
mode:
Diffstat (limited to 'rc.d')
-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