From 0093b7447019a9ca73c619c007fdd287329f9f52 Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Sat, 24 Sep 2011 22:21:32 +0200 Subject: 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 --- rc.shutdown | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'rc.shutdown') 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 -- cgit v1.2.3