]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
ifcfg/write-ifcfg.sh:
authorHarald Hoyer <harald@redhat.com>
Wed, 29 May 2013 12:38:52 +0000 (14:38 +0200)
committerHarald Hoyer <harald@redhat.com>
Wed, 29 May 2013 12:38:52 +0000 (14:38 +0200)
- fix ONBOOT for slaves
- set TYPE=Bond for bonding

https://bugzilla.redhat.com/show_bug.cgi?id=919001

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

index baa63fa4dbadae516a14e6752db0d32c2cf8c87d..625d00b7d5e7a32259d8d9761285924c00d63168 100755 (executable)
@@ -163,16 +163,16 @@ for netif in $IFACES ; do
             # This variable is an indicator of a bond interface for initscripts
             echo "BONDING_OPTS=\"$bondoptions\""
             echo "NAME=\"$netif\""
+            echo "TYPE=Bond"
         } >> /tmp/ifcfg/ifcfg-$netif
 
         for slave in $bondslaves ; do
-            # Set ONBOOT=no to prevent initscripts from trying to setup already bonded physical interface
             # write separate ifcfg file for the raw eth interface
             {
                 echo "# Generated by dracut initrd"
                 echo "DEVICE=$slave"
                 echo "TYPE=Ethernet"
-                echo "ONBOOT=no"
+                echo "ONBOOT=yes"
                 echo "NETBOOT=yes"
                 echo "HWADDR=$(cat /sys/class/net/$slave/address)"
                 echo "SLAVE=yes"
@@ -190,10 +190,9 @@ for netif in $IFACES ; do
         } >> /tmp/ifcfg/ifcfg-$netif
         if [ "$ethname" = "$bondname" ] ; then
             {
-                # Set ONBOOT=no to prevent initscripts from trying to setup already bridged bond interface
                 echo "# Generated by dracut initrd"
                 echo "DEVICE=$bondname"
-                echo "ONBOOT=no"
+                echo "ONBOOT=yes"
                 echo "NETBOOT=yes"
                 # This variable is an indicator of a bond interface for initscripts
                 echo "BONDING_OPTS=\"$bondoptions\""
@@ -202,12 +201,11 @@ for netif in $IFACES ; do
             } >> /tmp/ifcfg/ifcfg-$bondname
             for slave in $bondslaves ; do
                 # write separate ifcfg file for the raw eth interface
-                # Set ONBOOT=no to prevent initscripts from trying to setup already bridged physical interface
                 {
                     echo "# Generated by dracut initrd"
                     echo "DEVICE=$slave"
                     echo "TYPE=Ethernet"
-                    echo "ONBOOT=no"
+                    echo "ONBOOT=yes"
                     echo "NETBOOT=yes"
                     echo "HWADDR=$(cat /sys/class/net/$slave/address)"
                     echo "SLAVE=yes"
@@ -221,7 +219,7 @@ for netif in $IFACES ; do
                 echo "# Generated by dracut initrd"
                 echo "DEVICE=$ethname"
                 echo "TYPE=Ethernet"
-                echo "ONBOOT=no"
+                echo "ONBOOT=yes"
                 echo "NETBOOT=yes"
                 echo "HWADDR=$(cat /sys/class/net/$ethname/address)"
                 echo "BRIDGE=$netif"