about summary refs log tree commit diff
path: root/installer.sh.in
diff options
context:
space:
mode:
authorJuan RP <xtraeme@gmail.com>2015-05-20 11:23:10 +0200
committerJuan RP <xtraeme@gmail.com>2015-05-20 11:23:10 +0200
commitd177ef47d6649eec42ff3106e9cbf78b95565f6d (patch)
treed5b078704ca35d4336e7ab5d0d622b4ae0e0ae39 /installer.sh.in
parentb231ef76f510586d7196856f78a2c53fc76564e7 (diff)
parentf3b9e9d2e42f307634402e5ae85bde76a378cd3b (diff)
downloadhrmpf-d177ef47d6649eec42ff3106e9cbf78b95565f6d.tar.gz
hrmpf-d177ef47d6649eec42ff3106e9cbf78b95565f6d.tar.xz
hrmpf-d177ef47d6649eec42ff3106e9cbf78b95565f6d.zip
Merge pull request #27 from pullmoll/master
installer.sh.in: really fix the md parsing
Diffstat (limited to 'installer.sh.in')
-rw-r--r--installer.sh.in7
1 files changed, 4 insertions, 3 deletions
diff --git a/installer.sh.in b/installer.sh.in
index b097ca6..cda386d 100644
--- a/installer.sh.in
+++ b/installer.sh.in
@@ -166,11 +166,12 @@ show_partitions() {
     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}')
+        part=$(basename $p)
+        if cat /proc/mdstat|grep -qw $part; then
+            fstype=$(lsblk -nfr /dev/$part|awk '{print $2}')
             [ "$fstype" = "crypto_LUKS" ] && continue
             [ "$fstype" = "LVM2_member" ] && continue
-            fssize=$(lsblk -nr /dev/$p|awk '{print $4}')
+            fssize=$(lsblk -nr /dev/$part|awk '{print $4}')
             echo "$p"
             echo "size:${fssize:-unknown};fstype:${fstype:-none}"
         fi