X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=components%2F9990-main.sh;h=063445b008f08073bf15b60a0dac153ef9a02729;hb=HEAD;hp=7fb7ed367513e392fae554e6568322785920725c;hpb=61b7447e18fa6d7d9896541355a23752fc9f1544;p=live-boot-grml.git diff --git a/components/9990-main.sh b/components/9990-main.sh index 7fb7ed3..063445b 100755 --- a/components/9990-main.sh +++ b/components/9990-main.sh @@ -80,6 +80,30 @@ Live () fi fi + # If the live media location is given via command line and access to it + # involves LVM volumes, the corresponding volumes need to be activated. + IFS=',' + for dev in $(echo "$LIVE_MEDIA") + do + case "$dev" in + /dev/mapper/*) + eval $(dmsetup splitname --nameprefixes --noheadings --rows "${dev#/dev/mapper/}") + if [ "$DM_VG_NAME" ] && [ "$DM_LV_NAME" ] + then + lvm lvchange -aay -y --sysinit --ignoreskippedcluster "$DM_VG_NAME/$DM_LV_NAME" + fi + ;; + /dev/*/*) + # Could be /dev/VG/LV; use lvs to check + if lvm lvs -- "$dev" >/dev/null 2>&1 + then + lvm lvchange -aay -y --sysinit --ignoreskippedcluster "$dev" + fi + ;; + esac + done + unset IFS + # Scan local devices for the image i=0 while [ "$i" -lt 60 ]