]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
network: fix ip=ibft regression
authorChris Leech <cleech@redhat.com>
Wed, 5 Sep 2012 23:54:04 +0000 (16:54 -0700)
committerHarald Hoyer <harald@redhat.com>
Thu, 6 Sep 2012 10:18:06 +0000 (12:18 +0200)
It looks like ip=ibft has been busted since
  25aa3c5 network: refactor stuff from netroot/parse-ip-opts to net-lib
which moved ibft parsing code out to the ibft_to_cmdline function.

The use of ifname_mac was partially replaced by a local mac, but not
completely, causing ibft_to_cmdline to abort without generating network
configuration options.

Signed-off-by: Chris Leech <cleech@redhat.com>
modules.d/40network/net-lib.sh

index 641b21e77984d25687176f3114320ee0b12b7238..10b630e573404fb2cc62cc037033561371e37a5d 100644 (file)
@@ -145,8 +145,8 @@ ibft_to_cmdline() {
         for iface in /sys/firmware/ibft/ethernet*; do
             [ -e ${iface}/mac ] || continue
             mac=$(read a < ${iface}/mac; echo $a)
-            [ -z "$ifname_mac" ] && continue
-            dev=$(set_ifname ibft $ifname_mac)
+            [ -z "$mac" ] && continue
+            dev=$(set_ifname ibft $mac)
             dhcp=$(read a < ${iface}/dhcp; echo $a)
             if [ -n "$dhcp" ]; then
                 echo "ip=$dev:dhcp"