installer.sh.in: really fix the md parsing
This commit is contained in:
parent
0493378c0c
commit
3f0dfe5832
@ -166,11 +166,12 @@ show_partitions() {
|
|||||||
done
|
done
|
||||||
# Software raid (md)
|
# Software raid (md)
|
||||||
for p in $(ls -d /dev/md* 2>/dev/null|grep '[0-9]'); do
|
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
|
part=$(basename $p)
|
||||||
fstype=$(lsblk -nfr /dev/$p|awk '{print $2}')
|
if cat /proc/mdstat|grep -qw $part; then
|
||||||
|
fstype=$(lsblk -nfr /dev/$part|awk '{print $2}')
|
||||||
[ "$fstype" = "crypto_LUKS" ] && continue
|
[ "$fstype" = "crypto_LUKS" ] && continue
|
||||||
[ "$fstype" = "LVM2_member" ] && continue
|
[ "$fstype" = "LVM2_member" ] && continue
|
||||||
fssize=$(lsblk -nr /dev/$p|awk '{print $4}')
|
fssize=$(lsblk -nr /dev/$part|awk '{print $4}')
|
||||||
echo "$p"
|
echo "$p"
|
||||||
echo "size:${fssize:-unknown};fstype:${fstype:-none}"
|
echo "size:${fssize:-unknown};fstype:${fstype:-none}"
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user