diff options
author | Vladislav Bogdanov <bubble@hoster-ok.com> | 2010-10-28 13:12:18 +0200 |
---|---|---|
committer | Harald Hoyer <harald@redhat.com> | 2010-10-28 17:11:34 +0200 |
commit | 3afca618da34a7363a1a4763488e87c2ab157386 (patch) | |
tree | 04691a0e11dc701b25775b548c5b74df5e5c4012 /modules.d/45ifcfg | |
parent | 2c1f37d45cd5dc01482e1935c2a9ae29becb5c61 (diff) | |
download | dracut-3afca618da34a7363a1a4763488e87c2ab157386.tar.gz dracut-3afca618da34a7363a1a4763488e87c2ab157386.tar.bz2 dracut-3afca618da34a7363a1a4763488e87c2ab157386.zip |
ifcfg/write-ifcfg.sh: fixes typos and generated ifcfg files
Diffstat (limited to 'modules.d/45ifcfg')
-rwxr-xr-x | modules.d/45ifcfg/write-ifcfg.sh | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh index 968d9f01..022467b6 100755 --- a/modules.d/45ifcfg/write-ifcfg.sh +++ b/modules.d/45ifcfg/write-ifcfg.sh @@ -50,7 +50,7 @@ for netif in $IFACES ; do } > /tmp/ifcfg/ifcfg-$netif # bridge needs different things written to ifcfg - if [ -z "$bridge" ] && if [ -z "$bond" ]; then + if [ -z "$bridge" ] && [ -z "$bond" ]; then # standard interface { echo "HWADDR=$(cat /sys/class/net/$netif/address)" @@ -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 |