aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/init.d/halt
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2001-08-03 02:53:50 +0000
committerBill Nottingham <notting@redhat.com>2001-08-03 02:53:50 +0000
commit0a178086c1be75e57b290d3791e6a435331eb843 (patch)
tree192e06b5e4cf749416b87e52c1b826e153143b4d /rc.d/init.d/halt
parent5dc155ea81911686f74cd3bb27d7f752ac4c8428 (diff)
downloadinitscripts-0a178086c1be75e57b290d3791e6a435331eb843.tar
initscripts-0a178086c1be75e57b290d3791e6a435331eb843.tar.gz
initscripts-0a178086c1be75e57b290d3791e6a435331eb843.tar.bz2
initscripts-0a178086c1be75e57b290d3791e6a435331eb843.tar.xz
initscripts-0a178086c1be75e57b290d3791e6a435331eb843.zip
define halt_get_remaining before it's used (#50720)
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