aboutsummaryrefslogtreecommitdiff
path: root/rc.shutdown
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2010-12-06 13:15:15 +0100
committerTom Gundersen <teg@jklm.no>2010-12-06 15:12:33 +0100
commitfeef447b8368244525dd98582b662a369098b2f7 (patch)
treebc8a6d3ca4f00a1d4c5a55964f10f18338e8aa16 /rc.shutdown
parentb4c804d60d6e8361db3f19bf3a2fa6fb58ee8458 (diff)
downloadinitscripts-feef447b8368244525dd98582b662a369098b2f7.tar.xz
lvm: enable/disable monitoring of lvm2 groups
Monitoring does not work when /var is mounted ro, so only enable monitoring when we know that /var is rw. Thanks to Thomas Bächler for pointing this out.
Diffstat (limited to 'rc.shutdown')
-rwxr-xr-xrc.shutdown7
1 files changed, 7 insertions, 0 deletions
diff --git a/rc.shutdown b/rc.shutdown
index ba4699f..8a63966 100755
--- a/rc.shutdown
+++ b/rc.shutdown
@@ -60,6 +60,13 @@ stat_busy "Deactivating Swap"
/sbin/swapoff -a
stat_done
+# stop monitoring of lvm2 groups before unmounting filesystems
+if [[ $USELVM =~ yes|YES && -x /sbin/lvm && -d /sys/block ]]; then
+ stat_busy "Deactivating monitoring of LVM2 groups"
+ /sbin/vgchange --monitor n >/dev/null 2>&1
+ stat_done
+fi
+
stat_busy "Unmounting Filesystems"
/bin/umount -a -r -t noramfs,notmpfs,nosysfs,noproc,nodevtmpfs -O no_netdev
stat_done