aboutsummaryrefslogtreecommitdiff
path: root/rc.shutdown
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2011-09-24 22:21:32 +0200
committerTom Gundersen <teg@jklm.no>2011-09-25 00:55:35 +0200
commit0093b7447019a9ca73c619c007fdd287329f9f52 (patch)
tree402d0afe008aa88874a149cff58b2bd95da570a1 /rc.shutdown
parent5f7f87fa3259310454793521ac181028c31c1014 (diff)
downloadinitscripts-0093b7447019a9ca73c619c007fdd287329f9f52.tar.xz
shutdown: move disabling of monitoring/swap
We do this before killing all processes. There is no reason to do it later, and this might give some processes a bit more time to terminate properly. Signed-off-by: Tom Gundersen <teg@jklm.no>
Diffstat (limited to 'rc.shutdown')
-rwxr-xr-xrc.shutdown13
1 files changed, 6 insertions, 7 deletions
diff --git a/rc.shutdown b/rc.shutdown
index ad91f76..ea86f8f 100755
--- a/rc.shutdown
+++ b/rc.shutdown
@@ -19,6 +19,12 @@ run_hook shutdown_start
stop_all_daemons
+status "Deactivating Swap" swapoff -a
+
+# stop monitoring of lvm2 groups before unmounting filesystems
+[[ $USELVM = [Yy][Ee][Ss] && -x $(type -P lvm) ]] &&
+ status "Deactivating monitoring of LVM2 groups" vgchange --monitor n
+
run_hook shutdown_prekillall
kill_all
@@ -42,13 +48,6 @@ stat_done
# Write to wtmp file before unmounting
halt -w
-status "Deactivating Swap" swapoff -a
-
-# stop monitoring of lvm2 groups before unmounting filesystems
-[[ $USELVM = [Yy][Ee][Ss] && -x $(type -P lvm) && -d /sys/block ]] &&
- status "Deactivating monitoring of LVM2 groups" \
- vgchange --monitor n &>/dev/null
-
# if we don't have devtmpfs support, /dev is mounted as tmpfs, so don't unmount it
status "Unmounting Filesystems" \
umount -a -r -t nodevtmpfs,notmpfs,nosysfs,noproc,nodevpts -O no_netdev