summaryrefslogtreecommitdiffstats
path: root/snippets
diff options
context:
space:
mode:
authorJames Laska <jlaska@redhat.com>2008-12-17 14:21:09 -0500
committerJames Laska <jlaska@redhat.com>2008-12-17 14:21:09 -0500
commitc1d4df0092c5f4aa05aaea66355e85c9a1478edc (patch)
tree5292bdb66fb37d7e0f83193a467597b7601949f6 /snippets
parent03c82b3d6d819c31465b2064f45f31821a974289 (diff)
parent02a01e98e454237ae9c5324c7f9e2092591a52b4 (diff)
downloadcobbler-c1d4df0092c5f4aa05aaea66355e85c9a1478edc.tar.gz
cobbler-c1d4df0092c5f4aa05aaea66355e85c9a1478edc.tar.xz
cobbler-c1d4df0092c5f4aa05aaea66355e85c9a1478edc.zip
Merge commit 'origin/devel' into devel
Diffstat (limited to 'snippets')
-rw-r--r--snippets/post_install_network_config10
1 files changed, 9 insertions, 1 deletions
diff --git a/snippets/post_install_network_config b/snippets/post_install_network_config
index 9e121f1a..e21ce960 100644
--- a/snippets/post_install_network_config
+++ b/snippets/post_install_network_config
@@ -54,7 +54,9 @@
## setup bonding if we have to
#if $numbondingdevs > 0
- echo "options bonding max_bonds=$numbondingdevs" >> /etc/modprobe.conf
+ if [-x "/etc/modprobe.conf"]; then;
+ echo "options bonding max_bonds=$numbondingdevs" >> /etc/modprobe.conf
+ fi
#end if
## =============================================================================
@@ -112,7 +114,9 @@
#if $bonding.lower() == "master"
## Add required entry to modprobe.conf
+ if [-x "/etc/modprobe.conf"]; then
echo "alias $iname bonding" >> /etc/modprobe.conf.cobbler
+ fi
#end if
#if $configbymac and $is_vlan == "false" and $bonding.lower() != "master"
@@ -125,10 +129,12 @@
## Rename this interface in modprobe.conf
## FIXME: if both interfaces startwith eth this is wrong
+ if [-x "/etc/modprobe.conf"]; then;
grep \$IFNAME /etc/modprobe.conf | sed "s/\$IFNAME/$iname/" >> /etc/modprobe.conf.cobbler
grep -v \$IFNAME /etc/modprobe.conf >> /etc/modprobe.conf.new
rm -f /etc/modprobe.conf
mv /etc/modprobe.conf.new /etc/modprobe.conf
+ fi
echo "DEVICE=$iname" > $devfile
echo "HWADDR=$mac" >> $devfile
@@ -299,8 +305,10 @@
rm -f /etc/sysconfig/network-scripts/ifcfg-*
mv /etc/sysconfig/network-scripts/cobbler/* /etc/sysconfig/network-scripts/
rm -r /etc/sysconfig/network-scripts/cobbler
+if [-x "/etc/modprobe.conf"]; then;
cat /etc/modprobe.conf.cobbler >> /etc/modprobe.conf
rm -f /etc/modprobe.conf.cobbler
+fi
#end if