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

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