]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
ifcfg/write-ifcfg.sh: don't bind interface, if physical device is set
authorHarald Hoyer <harald@redhat.com>
Fri, 9 Oct 2015 09:31:28 +0000 (11:31 +0200)
committerHarald Hoyer <harald@redhat.com>
Fri, 9 Oct 2015 09:31:28 +0000 (11:31 +0200)
If a physical device is defined, we don't need to bind the interface to
the MAC address or something else.

modules.d/45ifcfg/write-ifcfg.sh

index ed66370fcab865b4b7a1228a931a8d658c34181d..1e7f694a7523ef602e816fd035ab5c791434840d 100755 (executable)
@@ -141,6 +141,7 @@ for netup in /tmp/net.*.did-setup ; do
     unset slave
     unset ethname
     unset vlan
+    unset phydevice
 
     [ -e /tmp/bond.${netif}.info ] && . /tmp/bond.${netif}.info
     [ -e /tmp/team.${netif}.info ] && . /tmp/team.${netif}.info
@@ -164,7 +165,7 @@ for netup in /tmp/net.*.did-setup ; do
     {
         echo "# Generated by dracut initrd"
         echo "NAME=\"$netif\""
-        interface_bind "$netif" "$macaddr"
+        [ -z "$phydevice" ] && interface_bind "$netif" "$macaddr"
         echo "ONBOOT=yes"
         echo "NETBOOT=yes"
         echo "UUID=\"$uuid\""