History

installer.sh.in: really fix the md parsing

jbu committed 11 years ago

Commit 3f0dfe51 parent 04933781 file · +4 −3Browse files

Unified · Split

installer.sh.in+4−3
@@ -166,11 +166,12 @@ show_partitions() { · 165 unmodified lines
166166 done
167167 # Software raid (md)
168168 for p in $(ls -d /dev/md* 2>/dev/null|grep '[0-9]'); do
169− if cat /proc/mdstat|grep -qw $(echo $p|sed -e 's|/dev/||g'); then
170− fstype=$(lsblk -nfr /dev/$p|awk '{print $2}')
169+ part=$(basename $p)
170+ if cat /proc/mdstat|grep -qw $part; then
171+ fstype=$(lsblk -nfr /dev/$part|awk '{print $2}')
171172 [ "$fstype" = "crypto_LUKS" ] && continue
172173 [ "$fstype" = "LVM2_member" ] && continue
173− fssize=$(lsblk -nr /dev/$p|awk '{print $4}')
174+ fssize=$(lsblk -nr /dev/$part|awk '{print $4}')
174175 echo "$p"
175176 echo "size:${fssize:-unknown};fstype:${fstype:-none}"
176177 fi

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t