Harald Hoyer 75f812
From 6625c085aeee0694f4f53b0454ff3466755d90a8 Mon Sep 17 00:00:00 2001
Harald Hoyer 75f812
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer 75f812
Date: Wed, 29 May 2013 14:38:52 +0200
Harald Hoyer 75f812
Subject: [PATCH] ifcfg/write-ifcfg.sh:
Harald Hoyer 75f812
Harald Hoyer 75f812
- fix ONBOOT for slaves
Harald Hoyer 75f812
- set TYPE=Bond for bonding
Harald Hoyer 75f812
Harald Hoyer 75f812
https://bugzilla.redhat.com/show_bug.cgi?id=919001
Harald Hoyer 75f812
---
Harald Hoyer 75f812
 modules.d/45ifcfg/write-ifcfg.sh | 12 +++++-------
Harald Hoyer 75f812
 1 file changed, 5 insertions(+), 7 deletions(-)
Harald Hoyer 75f812
Harald Hoyer 75f812
diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh
Harald Hoyer 75f812
index baa63fa..625d00b 100755
Harald Hoyer 75f812
--- a/modules.d/45ifcfg/write-ifcfg.sh
Harald Hoyer 75f812
+++ b/modules.d/45ifcfg/write-ifcfg.sh
Harald Hoyer 75f812
@@ -163,16 +163,16 @@ for netif in $IFACES ; do
Harald Hoyer 75f812
             # This variable is an indicator of a bond interface for initscripts
Harald Hoyer 75f812
             echo "BONDING_OPTS=\"$bondoptions\""
Harald Hoyer 75f812
             echo "NAME=\"$netif\""
Harald Hoyer 75f812
+            echo "TYPE=Bond"
Harald Hoyer 75f812
         } >> /tmp/ifcfg/ifcfg-$netif
Harald Hoyer 75f812
 
Harald Hoyer 75f812
         for slave in $bondslaves ; do
Harald Hoyer 75f812
-            # Set ONBOOT=no to prevent initscripts from trying to setup already bonded physical interface
Harald Hoyer 75f812
             # write separate ifcfg file for the raw eth interface
Harald Hoyer 75f812
             {
Harald Hoyer 75f812
                 echo "# Generated by dracut initrd"
Harald Hoyer 75f812
                 echo "DEVICE=$slave"
Harald Hoyer 75f812
                 echo "TYPE=Ethernet"
Harald Hoyer 75f812
-                echo "ONBOOT=no"
Harald Hoyer 75f812
+                echo "ONBOOT=yes"
Harald Hoyer 75f812
                 echo "NETBOOT=yes"
Harald Hoyer 75f812
                 echo "HWADDR=$(cat /sys/class/net/$slave/address)"
Harald Hoyer 75f812
                 echo "SLAVE=yes"
Harald Hoyer 75f812
@@ -190,10 +190,9 @@ for netif in $IFACES ; do
Harald Hoyer 75f812
         } >> /tmp/ifcfg/ifcfg-$netif
Harald Hoyer 75f812
         if [ "$ethname" = "$bondname" ] ; then
Harald Hoyer 75f812
             {
Harald Hoyer 75f812
-                # Set ONBOOT=no to prevent initscripts from trying to setup already bridged bond interface
Harald Hoyer 75f812
                 echo "# Generated by dracut initrd"
Harald Hoyer 75f812
                 echo "DEVICE=$bondname"
Harald Hoyer 75f812
-                echo "ONBOOT=no"
Harald Hoyer 75f812
+                echo "ONBOOT=yes"
Harald Hoyer 75f812
                 echo "NETBOOT=yes"
Harald Hoyer 75f812
                 # This variable is an indicator of a bond interface for initscripts
Harald Hoyer 75f812
                 echo "BONDING_OPTS=\"$bondoptions\""
Harald Hoyer 75f812
@@ -202,12 +201,11 @@ for netif in $IFACES ; do
Harald Hoyer 75f812
             } >> /tmp/ifcfg/ifcfg-$bondname
Harald Hoyer 75f812
             for slave in $bondslaves ; do
Harald Hoyer 75f812
                 # write separate ifcfg file for the raw eth interface
Harald Hoyer 75f812
-                # Set ONBOOT=no to prevent initscripts from trying to setup already bridged physical interface
Harald Hoyer 75f812
                 {
Harald Hoyer 75f812
                     echo "# Generated by dracut initrd"
Harald Hoyer 75f812
                     echo "DEVICE=$slave"
Harald Hoyer 75f812
                     echo "TYPE=Ethernet"
Harald Hoyer 75f812
-                    echo "ONBOOT=no"
Harald Hoyer 75f812
+                    echo "ONBOOT=yes"
Harald Hoyer 75f812
                     echo "NETBOOT=yes"
Harald Hoyer 75f812
                     echo "HWADDR=$(cat /sys/class/net/$slave/address)"
Harald Hoyer 75f812
                     echo "SLAVE=yes"
Harald Hoyer 75f812
@@ -221,7 +219,7 @@ for netif in $IFACES ; do
Harald Hoyer 75f812
                 echo "# Generated by dracut initrd"
Harald Hoyer 75f812
                 echo "DEVICE=$ethname"
Harald Hoyer 75f812
                 echo "TYPE=Ethernet"
Harald Hoyer 75f812
-                echo "ONBOOT=no"
Harald Hoyer 75f812
+                echo "ONBOOT=yes"
Harald Hoyer 75f812
                 echo "NETBOOT=yes"
Harald Hoyer 75f812
                 echo "HWADDR=$(cat /sys/class/net/$ethname/address)"
Harald Hoyer 75f812
                 echo "BRIDGE=$netif"