Blame SOURCES/0358-write-ifcfg-fix-creating-configuration-for-VLAN.patch

712866
From 32398e15250018c908d344060a7d9ab72c4ce5d0 Mon Sep 17 00:00:00 2001
712866
From: Fedora dracut team <dracut-maint@redhat.com>
712866
Date: Mon, 19 Oct 2015 18:27:11 +0200
712866
Subject: [PATCH] write-ifcfg: fix creating configuration for VLAN
712866
712866
Currently the physdev is unset before it is somehow applied.
712866
Also there is no DEVICE in the output.
712866
---
712866
 modules.d/45ifcfg/write-ifcfg.sh | 5 ++---
712866
 1 file changed, 2 insertions(+), 3 deletions(-)
712866
712866
diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh
5c6c2a
index 1e7f694a..f3a1c109 100755
712866
--- a/modules.d/45ifcfg/write-ifcfg.sh
712866
+++ b/modules.d/45ifcfg/write-ifcfg.sh
712866
@@ -141,7 +141,6 @@ 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
@@ -165,7 +164,7 @@ for netup in /tmp/net.*.did-setup ; do
712866
     {
712866
         echo "# Generated by dracut initrd"
712866
         echo "NAME=\"$netif\""
712866
-        [ -z "$phydevice" ] && interface_bind "$netif" "$macaddr"
712866
+        [ -z "$vlan" ] && interface_bind "$netif" "$macaddr"
712866
         echo "ONBOOT=yes"
712866
         echo "NETBOOT=yes"
712866
         echo "UUID=\"$uuid\""
712866
@@ -219,7 +218,7 @@ for netup in /tmp/net.*.did-setup ; do
712866
     if [ -n "$vlan" ] ; then
712866
         {
712866
             echo "TYPE=Vlan"
712866
-            echo "NAME=\"$netif\""
712866
+            echo "DEVICE=\"$netif\""
712866
             echo "VLAN=yes"
712866
             echo "PHYSDEV=\"$phydevice\""
712866
         } >> /tmp/ifcfg/ifcfg-$netif