aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/init.d/halt
diff options
context:
space:
mode:
Diffstat (limited to 'rc.d/init.d/halt')
-rwxr-xr-xrc.d/init.d/halt10
1 files changed, 6 insertions, 4 deletions
diff --git a/rc.d/init.d/halt b/rc.d/init.d/halt
index 30622249..288beb46 100755
--- a/rc.d/init.d/halt
+++ b/rc.d/init.d/halt
@@ -25,6 +25,11 @@ runcmd() {
echo
}
+halt_get_remaining() {
+ awk '!/(^#|proc|loopfs|autofs|^none|^\/dev\/root| \/ )/ {print $2}' /proc/mounts
+ awk '{ if ($3 ~ /^proc$/ && $2 !~ /^\/proc/) print $2; }' /proc/mounts
+}
+
# See how we were called.
case "$0" in
*halt)
@@ -145,10 +150,7 @@ remaining=`awk '!/^#/ && $1 ~ /^\/dev\/loop/ && $2 != "/" {print $2}' /proc/moun
sig=
retry=3
remaining=`halt_get_remaining`
-halt_get_remaining() {
- awk '!/(^#|proc|loopfs|autofs|^none|^\/dev\/root| \/ )/ {print $2}' /proc/mounts
- awk '{ if ($3 ~ /^proc$/ && $2 !~ /^\/proc/) print $2; }' /proc/mounts
-}
+
while [ -n "$remaining" -a "$retry" -gt 0 ]
do
if [ "$retry" -lt 3 ]; then