Merge remote-tracking branch 'origin/github/pr/16'
authorMichael Prokop <mika@grml.org>
Fri, 8 Sep 2023 09:14:20 +0000 (11:14 +0200)
committerMichael Prokop <mika@grml.org>
Fri, 8 Sep 2023 09:14:20 +0000 (11:14 +0200)
components/9990-main.sh
debian/changelog

index 7fb7ed3..063445b 100755 (executable)
@@ -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 ]
index e1e25e9..b1db94d 100644 (file)
@@ -1,3 +1,10 @@
+live-boot (1:20210208+grml.4) unstable; urgency=medium
+
+  [ Michael Laß ]
+  * [98d3d05] 9990-main.sh: activate LVM volumes if needed.
+
+ -- Michael Prokop <mika@grml.org>  Fri, 08 Sep 2023 08:50:55 +0200
+
 live-boot (1:20210208+grml.3) unstable; urgency=medium
 
   [ Mihai Moldovan ]