diff options
author | Jasper Capel <capel@stone-it.com> | 2008-11-05 10:43:36 +0100 |
---|---|---|
committer | Jasper Capel <capel@stone-it.com> | 2008-11-05 10:43:36 +0100 |
commit | b96f402e3c7cf92ea8866f07f008679e8315961a (patch) | |
tree | 82940b56f3a1c192bcd8cae1c0e6560ac0389950 /snippets/post_install_network_config | |
parent | df589896ee0f0f2f33767db7a12a09a9a1a06aeb (diff) | |
download | cobbler-b96f402e3c7cf92ea8866f07f008679e8315961a.tar.gz cobbler-b96f402e3c7cf92ea8866f07f008679e8315961a.tar.xz cobbler-b96f402e3c7cf92ea8866f07f008679e8315961a.zip |
Fix in post-install bonding code
Diffstat (limited to 'snippets/post_install_network_config')
-rw-r--r-- | snippets/post_install_network_config | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/snippets/post_install_network_config b/snippets/post_install_network_config index 72e6bb51..748aab99 100644 --- a/snippets/post_install_network_config +++ b/snippets/post_install_network_config @@ -52,12 +52,13 @@ echo "alias $iname bonding" >> /etc/modprobe.conf #if $configbymac and $is_vlan == "false" and $bonding.lower() != "master" ## This is the code path physical interfaces will follow. ## Remove the interface file anaconda made for this mac address -IFFILE=`grep -i "$mac" /etc/sysconfig/network-scripts/ifcfg-* | cut -d ":" -f 1` -IFNAME=`grep "DEVICE=" \$IFFILE | cut -d "=" -f 2` +##IFFILE=`grep -i "$mac" /etc/sysconfig/network-scripts/ifcfg-* | cut -d ":" -f 1` +##IFNAME=`grep "DEVICE=" \$IFFILE | cut -d "=" -f 2` +IFNAME=\$(ifconfig | grep -i '$mac' | cut -d ' ' -f 1) ## Rename this interface in modprobe.conf sed -i "s/\$IFNAME/$iname/" /etc/modprobe.conf ## Remove the old interface file the OS had for it -rm -f \$IFFILE +rm -f /etc/sysconfig/network-scripts/ifcfg-\$IFNAME echo "DEVICE=$iname" > $devfile echo "ONBOOT=yes" >> $devfile #if $bonding.lower() == "slave" and $bonding_master != "" |