From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vladislav Bogdanov Subject: One more fix (was Re: [RFC] [PATCH] Bonding support for dracut) Date: Tue, 19 Oct 2010 17:49:09 +0300 Message-ID: <4CBDAFE5.3020102@hoster-ok.com> References: <4CBC37E7.9010904@hoster-ok.com> <4CBC4661.3020100@redhat.com> <4CBC504A.7020002@hoster-ok.com> <4CBC566C.9080407@redhat.com> <4CBC5A48.1010304@hoster-ok.com> <4CBC5C7C.4000504@redhat.com> <4CBDA315.2070603@hoster-ok.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------030408010701000006030702" Return-path: In-Reply-To: <4CBDA315.2070603-Awb4OmSD/41iLUuM0BA3LQ@public.gmane.org> Sender: initramfs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: To: Harald Hoyer Cc: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org This is a multi-part message in MIME format. --------------030408010701000006030702 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, one more patch with fixes is attached. Best, Vladislav --------------030408010701000006030702 Content-Type: text/x-patch; name="dracut-bonding-support-fixes.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="dracut-bonding-support-fixes.patch" diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh index 45fcde2..022467b 100755 --- a/modules.d/45ifcfg/write-ifcfg.sh +++ b/modules.d/45ifcfg/write-ifcfg.sh @@ -68,12 +68,13 @@ for netif in $IFACES ; do } >> /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=yes" + echo "ONBOOT=no" echo "NETBOOT=yes" echo "HWADDR=$(cat /sys/class/net/$slave/address)" echo "SLAVE=yes" @@ -91,23 +92,24 @@ for netif in $IFACES ; do } >> /tmp/ifcfg/ifcfg-$netif if [ "$ethname" = "$bondname" ] ; then { - # This variable is an indicator of a bond interface for initscripts + # Set ONBOOT=no to prevent initscripts from trying to setup already bridged bond interface echo "# Generated by dracut initrd" echo "DEVICE=$bondname" - echo "ONBOOT=yes" + echo "ONBOOT=no" echo "NETBOOT=yes" + # This variable is an indicator of a bond interface for initscripts echo "BONDING_OPTS=\"$bondoptions\"" echo "BRIDGE=$netif" echo "NAME=\"$bondname\"" } >> /tmp/ifcfg/ifcfg-$bondname for slave in $bondslaves ; do # write separate ifcfg file for the raw eth interface - # yes, duplicated code at this moment + # 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=yes" + echo "ONBOOT=no" echo "NETBOOT=yes" echo "HWADDR=$(cat /sys/class/net/$slave/address)" echo "SLAVE=yes" @@ -121,11 +123,11 @@ for netif in $IFACES ; do echo "# Generated by dracut initrd" echo "DEVICE=$ethname" echo "TYPE=Ethernet" - echo "ONBOOT=yes" + echo "ONBOOT=no" echo "NETBOOT=yes" echo "HWADDR=$(cat /sys/class/net/$ethname/address)" echo "BRIDGE=$netif" - echo "NAME=$ethname" + echo "NAME=$ethname" } >> /tmp/ifcfg/ifcfg-$ethname fi fi --------------030408010701000006030702--