From c913d33c793e1de6b902445b96a7de9451a107b0 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Tue, 14 Jan 2003 04:48:12 +0000 Subject: rework halt script (#76831, ) --- rc.d/init.d/halt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'rc.d') diff --git a/rc.d/init.d/halt b/rc.d/init.d/halt index 9c27a847..b9c082b3 100755 --- a/rc.d/init.d/halt +++ b/rc.d/init.d/halt @@ -23,9 +23,10 @@ runcmd() { } halt_get_remaining() { - awk '!/(^#|proc|loopfs|autofs|devfs|^none|^\/dev\/root| \/ )/ {print $2}' /proc/mounts - awk '{ if ($3 ~ /^proc$/ && $2 !~ /^\/proc/) print $2; }' /proc/mounts - awk '{ if ($3 ~ /^tmpfs$/ && $2 !~ /^\/dev/) print $2; }' /proc/mounts + awk '$2 ~ /^\/$|^\/proc|^\/dev/{next} + $3 == "tmpfs" || $3 == "proc" {print $2 ; next} + /(^#|loopfs|autofs|devfs|^none|^\/dev\/root)/ {next} + {print $2}' /proc/mounts } # See how we were called. -- cgit v1.2.1