about summary refs log tree commit diff
path: root/installer.sh.in
diff options
context:
space:
mode:
authorjbu <pullmoll@t-online.de>2015-05-08 07:06:26 +0200
committerjbu <pullmoll@t-online.de>2015-05-08 07:06:26 +0200
commit944153192b98c6f2ba66d8e6a4a87602610ce626 (patch)
tree02c116d4553d2d922874d5e0ba5279968b6dfe32 /installer.sh.in
parent929175a025254315fd0773d1af23943233616db8 (diff)
downloadhrmpf-944153192b98c6f2ba66d8e6a4a87602610ce626.tar.gz
hrmpf-944153192b98c6f2ba66d8e6a4a87602610ce626.tar.xz
hrmpf-944153192b98c6f2ba66d8e6a4a87602610ce626.zip
void-mklive: Fixes for systems with md / lvm2
- Add quotes around $TARGET to allow for empty $1 in build-x86-images.sh
- In installer.sh there was $part for md where it should have been $p
- The list of md and lvm partitions should occur just once, thus move it out of the loop
Diffstat (limited to 'installer.sh.in')
-rw-r--r--installer.sh.in25
1 files changed, 13 insertions, 12 deletions
diff --git a/installer.sh.in b/installer.sh.in
index 8af7b1d..9b84c9a 100644
--- a/installer.sh.in
+++ b/installer.sh.in
@@ -163,24 +163,25 @@ show_partitions() {
                 echo "size:${fssize:-unknown};fstype:${fstype:-none}"
             fi
         done
-        # Software raid (md)
-        for p in $(ls -d /dev/md* 2>/dev/null|grep '[0-9]'); do
-            if cat /proc/mdstat|grep -qw $(echo $p|sed -e 's|/dev/||g'); then
-                fstype=$(lsblk -nfr /dev/$part|awk '{print $2}')
-                fssize=$(lsblk -nr /dev/$p|awk '{print $4}')
-                echo "$p"
-                echo "size:${fssize:-unknown};fstype:${fstype:-none}"
-            fi
-        done
-        if [ ! -e /sbin/lvs ]; then
-            continue
+    done
+    # Software raid (md)
+    for p in $(ls -d /dev/md* 2>/dev/null|grep '[0-9]'); do
+        if cat /proc/mdstat|grep -qw $(echo $p|sed -e 's|/dev/||g'); then
+            fstype=$(lsblk -nfr /dev/$p|awk '{print $2}')
+            [ "$fstype" = "crypto_LUKS" ] && continue
+            [ "$fstype" = "LVM2_member" ] && continue
+            fssize=$(lsblk -nr /dev/$p|awk '{print $4}')
+            echo "$p"
+            echo "size:${fssize:-unknown};fstype:${fstype:-none}"
         fi
+    done
+    if [ -e /sbin/lvs ]; then
         # LVM
         lvs --noheadings|while read lvname vgname perms size; do
             echo "/dev/mapper/${vgname}-${lvname}"
             echo "size:${size};fstype:lvm"
         done
-    done
+    fi
 }
 
 menu_filesystems() {