aboutsummaryrefslogtreecommitdiff
path: root/rc.sysinit
diff options
context:
space:
mode:
authorThomas Bächler <thomas@archlinux.org>2007-01-29 20:45:25 +0000
committerThomas Bächler <thomas@archlinux.org>2007-01-29 20:45:25 +0000
commit78b5f6beee0453dd938f1a3c6a6ab5776e6d78f3 (patch)
treeae25cffabeaadedd7c11a22f7a708f1cce9841da /rc.sysinit
parent1bad30cc17f6cec15668f2bae9d6b72dd44788ee (diff)
downloadinitscripts-78b5f6beee0453dd938f1a3c6a6ab5776e6d78f3.tar.xz
fix 6038
Diffstat (limited to 'rc.sysinit')
-rwxr-xr-xrc.sysinit9
1 files changed, 9 insertions, 0 deletions
diff --git a/rc.sysinit b/rc.sysinit
index a9e4754..ea4ea9a 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -90,6 +90,7 @@ fi
if [ "$USELVM" = "yes" -o "$USELVM" = "YES" ]; then
if [ -x /sbin/lvm -a -d /sys/block ]; then
# Kernel 2.6.x, LVM2 groups
+ /sbin/modprobe -q dm-mod 2>/dev/null
stat_busy "Activating LVM2 groups"
/sbin/lvm vgscan --ignorelockingfailure --mknodes >/dev/null
/sbin/lvm vgchange --ignorelockingfailure -a y >/dev/null
@@ -103,6 +104,7 @@ fi
# Set up non-root encrypted partition mappings
if [ -f /etc/crypttab -a -n "$(grep -v ^# /etc/crypttab | grep -v ^$)" ]; then
+ /sbin/modprobe -q dm-mod 2>/dev/null
stat_busy "Unlocking encrypted volumes:"
csfailed=0
CS=/sbin/cryptsetup.static
@@ -145,6 +147,13 @@ if [ -f /etc/crypttab -a -n "$(grep -v ^# /etc/crypttab | grep -v ^$)" ]; then
else
stat_fail
fi
+ # Maybe someone has LVM on an encrypted block device
+ if [ "$USELVM" = "yes" -o "$USELVM" = "YES" ]; then
+ if [ -x /sbin/lvm -a -d /sys/block ]; then
+ /sbin/lvm vgscan --ignorelockingfailure --mknodes >/dev/null
+ /sbin/lvm vgchange --ignorelockingfailure -a y >/dev/null
+ fi
+ fi
fi
status "Mounting Root Read-only" /bin/mount -n -o remount,ro /