Blob Blame History Raw
From 3bce34dfd780b9aa9b93c0a09358096b48806c05 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Fri, 9 Oct 2015 11:31:28 +0200
Subject: [PATCH] ifcfg/write-ifcfg.sh: don't bind interface, if physical
 device is set

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 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh
index ed66370f..1e7f694a 100755
--- a/modules.d/45ifcfg/write-ifcfg.sh
+++ b/modules.d/45ifcfg/write-ifcfg.sh
@@ -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\""