]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
write-ifcfg: fix creating configuration for VLAN 98/head
authorFedora dracut team <dracut-maint@redhat.com>
Mon, 19 Oct 2015 16:27:11 +0000 (18:27 +0200)
committerLukas Nykryn <lnykryn@redhat.com>
Mon, 19 Oct 2015 16:32:01 +0000 (18:32 +0200)
Currently the physdev is unset before it is somehow applied.
Also there is no DEVICE in the output.

modules.d/45ifcfg/write-ifcfg.sh

index 1e7f694a7523ef602e816fd035ab5c791434840d..f3a1c1095288e9c4df9ee6200a90bcc9a4acb620 100755 (executable)
@@ -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