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

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