From 0a178086c1be75e57b290d3791e6a435331eb843 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Fri, 3 Aug 2001 02:53:50 +0000 Subject: define halt_get_remaining before it's used (#50720) --- rc.d/init.d/halt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'rc.d/init.d/halt') 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 -- cgit v1.2.1