From a3ec6a0c61c899499c8261c7bea0acc13f2d2011 Mon Sep 17 00:00:00 2001 From: Miloslav Trmac Date: Sun, 30 Jul 2006 03:07:49 +0000 Subject: Use /proc/mounts instead of /etc/mtab (via mount), to handle mount --rbind (#198426) --- rc.d/init.d/halt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'rc.d/init.d') 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 -- cgit v1.2.1