From 12dcde9163b5af37285a7999827261ebe876b5ff Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Fri, 28 May 2010 11:53:45 +0200 Subject: [PATCH] added last checks to additional devices --- usr/share/archboot/installer/setup | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/usr/share/archboot/installer/setup b/usr/share/archboot/installer/setup index 2c2d1bc42..90de21418 100755 --- a/usr/share/archboot/installer/setup +++ b/usr/share/archboot/installer/setup @@ -340,9 +340,22 @@ additional_blockdevices_partitions() { # Include MMC devices for dev in $(ls $block 2>/dev/null | egrep '^mmcblk'); do for i in $(ls $block/$dev 2>/dev/null | egrep ${dev}p); do - if [ -d "$block/$dev/$i" ]; then - echo "/dev/$i" - [ "$1" ] && echo $1 + if [ -d "$block/$dev/$i" ]; then + # exclude checks: + #- part of raid device + # $(cat /proc/mdstat 2>/dev/null | grep $i) + #- part of lvm2 device + # $(blkid -c=/dev/null -o value -s TYPE /dev/$i | grep "LVM2_member") + #- part of luks device + # $(blkid -c=/dev/null -o value -s TYPE /dev/$i | grep "crypto_LUKS") + #- extended partition on device + # $(sfdisk -c /dev/$dev $(echo $i | sed -e "s#${dev}\p##g" 2>/dev/null | grep "5") + #- bios_grub partitions + # $(echo $i | grep "[a-z]$(parted /dev/$dev print | grep bios_grub | cut -d " " -f 2)$") + if ! [ "$(cat /proc/mdstat 2>/dev/null | grep $i)" -o "$(blkid -c=/dev/null -o value -s TYPE /dev/$i | grep "LVM2_member")" -o $(blkid -c=/dev/null -o value -s TYPE /dev/$i | grep "crypto_LUKS") -o "$(sfdisk -c /dev/$dev $(echo $i | sed -e "s#${dev}\p##g") 2>/dev/null | grep "5")" -o "$(echo $i | grep "[a-z]$(parted /dev/$dev print | grep bios_grub | cut -d " " -f 2)$")" ]; then + echo "/dev/$i" + [ "$1" ] && echo $1 + fi fi done done