Blob Blame History Raw
From efd5178b6395f4994d005fd437ca916616d2f1ba Mon Sep 17 00:00:00 2001
From: Fedora dracut team <dracut-maint@redhat.com>
Date: Mon, 19 Oct 2015 18:27:11 +0200
Subject: [PATCH 358/359] write-ifcfg: fix creating configuration for VLAN

Currently the physdev is unset before it is somehow applied.
Also there is no DEVICE in the output.
---
 modules.d/45ifcfg/write-ifcfg.sh | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh
index 1e7f694..f3a1c10 100755
--- a/modules.d/45ifcfg/write-ifcfg.sh
+++ b/modules.d/45ifcfg/write-ifcfg.sh
@@ -141,7 +141,6 @@ for netup in /tmp/net.*.did-setup ; do
     unset slave
     unset ethname
     unset vlan
-    unset phydevice
 
     [ -e /tmp/bond.${netif}.info ] && . /tmp/bond.${netif}.info
     [ -e /tmp/team.${netif}.info ] && . /tmp/team.${netif}.info
@@ -165,7 +164,7 @@ for netup in /tmp/net.*.did-setup ; do
     {
         echo "# Generated by dracut initrd"
         echo "NAME=\"$netif\""
-        [ -z "$phydevice" ] && interface_bind "$netif" "$macaddr"
+        [ -z "$vlan" ] && interface_bind "$netif" "$macaddr"
         echo "ONBOOT=yes"
         echo "NETBOOT=yes"
         echo "UUID=\"$uuid\""
@@ -219,7 +218,7 @@ for netup in /tmp/net.*.did-setup ; do
     if [ -n "$vlan" ] ; then
         {
             echo "TYPE=Vlan"
-            echo "NAME=\"$netif\""
+            echo "DEVICE=\"$netif\""
             echo "VLAN=yes"
             echo "PHYSDEV=\"$phydevice\""
         } >> /tmp/ifcfg/ifcfg-$netif
-- 
2.4.3