commit 28c7fd330e587a18d438094c0199bc090508f122 Author: Hannes Reinecke Date: Mon Apr 12 16:02:33 2010 +0200 Only set nettype to 'dhcp' if valid DHCP address was found The attribute 'dhcp' is not sufficient to determine if dhcp was activated. We should be reading the contents of it and only enable dhcp if a valid address was found. References: bnc#576601 Signed-off-by: Hannes Reinecke diff --git a/etc/mkinitrd/ibft-boot.sh b/etc/mkinitrd/ibft-boot.sh index 61cdd14..8c76810 100644 --- a/etc/mkinitrd/ibft-boot.sh +++ b/etc/mkinitrd/ibft-boot.sh @@ -38,7 +38,12 @@ print_par() { if [ -d $ibft_nic ]; then if [ -s $ibft_nic/dhcp ]; then - nettype='dhcp' + read ibft_dhcp < $ibft_nic/dhcp + if [ "$ibft_dhcp" = "0.0.0.0" ] ; then + nettype='static' + else + nettype='dhcp' + fi else nettype='static' fi