Blame SOURCES/0356-ifcfg-write-ifcfg.sh-don-t-bind-interface-if-physica.patch

712866
From 3bce34dfd780b9aa9b93c0a09358096b48806c05 Mon Sep 17 00:00:00 2001
712866
From: Harald Hoyer <harald@redhat.com>
712866
Date: Fri, 9 Oct 2015 11:31:28 +0200
712866
Subject: [PATCH] ifcfg/write-ifcfg.sh: don't bind interface, if physical
712866
 device is set
712866
712866
If a physical device is defined, we don't need to bind the interface to
712866
the MAC address or something else.
712866
---
712866
 modules.d/45ifcfg/write-ifcfg.sh | 3 ++-
712866
 1 file changed, 2 insertions(+), 1 deletion(-)
712866
712866
diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh
5c6c2a
index ed66370f..1e7f694a 100755
712866
--- a/modules.d/45ifcfg/write-ifcfg.sh
712866
+++ b/modules.d/45ifcfg/write-ifcfg.sh
712866
@@ -141,6 +141,7 @@ for netup in /tmp/net.*.did-setup ; do
712866
     unset slave
712866
     unset ethname
712866
     unset vlan
712866
+    unset phydevice
712866
 
712866
     [ -e /tmp/bond.${netif}.info ] && . /tmp/bond.${netif}.info
712866
     [ -e /tmp/team.${netif}.info ] && . /tmp/team.${netif}.info
712866
@@ -164,7 +165,7 @@ for netup in /tmp/net.*.did-setup ; do
712866
     {
712866
         echo "# Generated by dracut initrd"
712866
         echo "NAME=\"$netif\""
712866
-        interface_bind "$netif" "$macaddr"
712866
+        [ -z "$phydevice" ] && interface_bind "$netif" "$macaddr"
712866
         echo "ONBOOT=yes"
712866
         echo "NETBOOT=yes"
712866
         echo "UUID=\"$uuid\""