aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d
diff options
context:
space:
mode:
Diffstat (limited to 'rc.d')
-rwxr-xr-xrc.d/init.d/functions14
-rwxr-xr-xrc.d/init.d/halt2
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