tools/livecd-iso-to-disk.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 9bf3a161c44c0d80e3d57d6c33c6dde65e3109d8 Author: Brian C. Lane bcl@redhat.com Date: Mon Sep 19 13:16:05 2011 -0700
Only check first match for boot flag (#739411)
If, for some reason, you are installing to a device with more than 9 partitions the boot flag check could match multiple lines (eg. /dev/sda1 also matches /dev/sda10). This limits the check to the first match.
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh index 43c825e..9c8c878 100755 --- a/tools/livecd-iso-to-disk.sh +++ b/tools/livecd-iso-to-disk.sh @@ -391,7 +391,7 @@ checkPartActive() { return fi
- if [ "$(/sbin/fdisk -l $device 2>/dev/null |grep $dev |awk {'print $2;'})" != "*" ]; then + if [ "$(/sbin/fdisk -l $device 2>/dev/null |grep -m1 $dev |awk {'print $2;'})" != "*" ]; then echo "Partition isn't marked bootable!" echo "You can mark the partition as bootable with " echo " # /sbin/parted $device"