From d618710be7a250589b2b1d966174dde0e559c384 Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Thu, 17 Dec 2009 12:05:16 +0100 Subject: [PATCH] Use correct value for iBFT 'origin' setting The spec actually defines an 'enum' for the origin setting, so we should be doing that, too. And we should not modify the nettype variable if we haven't found an interface from iBFT. References: bnc#565116 Signed-off-by: Hannes Reinecke diff --git a/etc/mkinitrd/mkinitrd-setup.sh b/etc/mkinitrd/mkinitrd-setup.sh index 7630ac1..e376287 100644 --- a/etc/mkinitrd/mkinitrd-setup.sh +++ b/etc/mkinitrd/mkinitrd-setup.sh @@ -74,12 +74,14 @@ if [ "${root_iscsi}" ]; then for if in $ibft_if/device/net/* ; do if [ -d $if ] ; then interface="${if##*/}" + break; fi done fi - # Bit 3 of 'origin' is DHCP + [ "$interface" ] || continue + # Type 3 of 'origin' is DHCP read ibft_origin < $ibft_if/origin - if (( $ibft_origin & 8 )) ; then + if [ $ibft_origin == 3 ] ; then nettype="dhcp" else nettype="static"