aboutsummaryrefslogtreecommitdiff
path: root/rc.shutdown
diff options
context:
space:
mode:
authorJudd Vinet <judd@archlinux.org>2004-05-27 00:30:15 +0000
committerJudd Vinet <judd@archlinux.org>2004-05-27 00:30:15 +0000
commitcd0e2c63acc50d080edba54b797f7f1c58da1312 (patch)
treec3e8733ff15054e495231af965e33822092a5731 /rc.shutdown
parentf396331a675e17ef282b56ea228e66383d401400 (diff)
downloadinitscripts-cd0e2c63acc50d080edba54b797f7f1c58da1312.tar.xz
fixed the lvm2 segfault on shutdown
Diffstat (limited to 'rc.shutdown')
-rwxr-xr-xrc.shutdown20
1 files changed, 12 insertions, 8 deletions
diff --git a/rc.shutdown b/rc.shutdown
index d266ddc..e536aae 100755
--- a/rc.shutdown
+++ b/rc.shutdown
@@ -64,14 +64,18 @@ stat_busy "Unmounting Filesystems"
/bin/umount -a
stat_done
-if [ -f /etc/lvmtab -a -x /sbin/vgchange ]; then
- stat_busy "Deactivating LVM1 groups"
- /sbin/vgchange -a n
- stat_done
-elif [ -d /etc/lvm -a -x /sbin/lvm ]; then
- stat_busy "Deactivating LVM2 groups"
- /sbin/lvm vgchange --ignorelockingfailure -a n
- stat_done
+if [ "$USELVM" = "yes" -o "$USELVM" = "YES" ]; then
+ if [ -f /etc/lvmtab -a -x /sbin/vgchange ]; then
+ stat_busy "Deactivating LVM1 groups"
+ /sbin/vgchange -a n
+ stat_done
+ elif [ -d /etc/lvm -a -x /sbin/lvm ]; then
+ /bin/mount -n -t sysfs none /sys
+ stat_busy "Deactivating LVM2 groups"
+ /sbin/lvm vgchange --ignorelockingfailure -a n
+ stat_done
+ umount /sys
+ fi
fi
stat_busy "Remounting Root Filesystem Read-only"