diff options
author | Bill Nottingham <notting@redhat.com> | 2007-10-08 19:18:54 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2007-10-08 19:18:54 +0000 |
commit | 5941b5483e6d86d8aee8fa9749c30e69003ed908 (patch) | |
tree | a8d6ee6c51eed2f952fe9913609aaa0b1e371d4e | |
parent | 3d8fc36dba315b09cd97d829fca68267ebcebc64 (diff) | |
download | initscripts-5941b5483e6d86d8aee8fa9749c30e69003ed908.tar initscripts-5941b5483e6d86d8aee8fa9749c30e69003ed908.tar.gz initscripts-5941b5483e6d86d8aee8fa9749c30e69003ed908.tar.bz2 initscripts-5941b5483e6d86d8aee8fa9749c30e69003ed908.tar.xz initscripts-5941b5483e6d86d8aee8fa9749c30e69003ed908.zip |
clean up some extraneous delays (#219816)
-rwxr-xr-x | rc.d/init.d/functions | 14 | ||||
-rwxr-xr-x | rc.d/init.d/halt | 2 |
2 files changed, 11 insertions, 5 deletions
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions index 4740b9bd..ef7b2d00 100755 --- a/rc.d/init.d/functions +++ b/rc.d/init.d/functions @@ -92,7 +92,7 @@ __fgrep() { # paths; it doesn't have to handle comments in fstab_file. __umount_loop() { local remaining sig= - local retry=3 + local retry=3 count remaining=$(LC_ALL=C awk "/^#/ {next} $1" "$2" | sort -r) while [ -n "$remaining" -a "$retry" -gt 0 ]; do @@ -101,11 +101,17 @@ __umount_loop() { else action "$4" fstab-decode umount $5 $remaining fi - sleep 2 + count=4 remaining=$(LC_ALL=C awk "/^#/ {next} $1" "$2" | sort -r) + while [ "$count" -gt 0 ]; do + [ -z "$remaining" ] && break + count=$(($count-1)) + usleep 500000 + remaining=$(LC_ALL=C awk "/^#/ {next} $1" "$2" | sort -r) + done [ -z "$remaining" ] && break fstab-decode /sbin/fuser -k -m $sig $remaining >/dev/null - sleep 5 + sleep 3 retry=$(($retry -1)) sig=-9 done @@ -135,7 +141,7 @@ __umount_loopback_loop() { devremaining=$(awk '$1 ~ /^\/dev\/loop/ && $2 != "/" {print $1}' /proc/mounts) [ -z "$remaining" ] && break fstab-decode /sbin/fuser -k -m $sig $remaining >/dev/null - sleep 5 + sleep 3 retry=$(($retry -1)) sig=-9 done diff --git a/rc.d/init.d/halt b/rc.d/init.d/halt index 56a59012..ce6b24b1 100755 --- a/rc.d/init.d/halt +++ b/rc.d/init.d/halt @@ -66,7 +66,7 @@ esac [ "${BASH+bash}" = bash ] && enable kill action $"Sending all processes the TERM signal..." /sbin/killall5 -15 -sleep 5 +sleep 2 action $"Sending all processes the KILL signal..." /sbin/killall5 -9 # Write to wtmp file before unmounting /var |