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

64b87c
From efd5178b6395f4994d005fd437ca916616d2f1ba 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
64b87c
Subject: [PATCH 358/359] 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
64b87c
index 1e7f694..f3a1c10 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
64b87c
-- 
64b87c
2.4.3
64b87c