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

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