aboutsummaryrefslogtreecommitdiff
path: root/rc.shutdown
diff options
context:
space:
mode:
Diffstat (limited to 'rc.shutdown')
-rwxr-xr-xrc.shutdown15
1 files changed, 13 insertions, 2 deletions
diff --git a/rc.shutdown b/rc.shutdown
index 8bfc9ac..538eb96 100755
--- a/rc.shutdown
+++ b/rc.shutdown
@@ -62,10 +62,21 @@ stat_done
stat_busy "Unmounting Filesystems"
/bin/umount -a
-# for LVM:
-#/sbin/vgchange --ignorelockingfailure -a n
stat_done
+if [ -f /etc/lvmtab ]; then
+ if [ -x /sbin/lvm ]; then
+ stat_busy "Deactivating LVM2 groups"
+ /sbin/lvm vgchange --ignorelockingfailure -a n
+ stat_done
+ elif [ -x /sbin/vgchange ]; then
+ stat_busy "Deactivating LVM1 groups"
+ /sbin/vgchange -a n
+ stat_done
+ fi
+ umount /proc
+fi
+
stat_busy "Remounting Root Filesystem Read-only"
/bin/mount -n -o remount,ro /
stat_done