--- snippets/post_install_network_config | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/snippets/post_install_network_config b/snippets/post_install_network_config index ec9f15e..6166a1d 100644 --- a/snippets/post_install_network_config +++ b/snippets/post_install_network_config @@ -34,7 +34,7 @@ #set $i = 0 ## setup bonding if we have to #if $numbondingdevs > 0 -if [-x "/etc/modprobe.conf"]; then; +if [ -x "/etc/modprobe.conf" ]; then echo "options bonding max_bonds=$numbondingdevs" >> /etc/modprobe.conf fi #end if @@ -78,7 +78,7 @@ mv /etc/sysconfig/network.cobbler /etc/sysconfig/network ## if this is a bonded interface, configure it in modprobe.conf #if $bonding.lower() == "master" ## Add required entry to modprobe.conf -if [-x "/etc/modprobe.conf"]; then +if [ -x "/etc/modprobe.conf" ]; then echo "alias $iname bonding" >> /etc/modprobe.conf.cobbler fi #end if @@ -88,7 +88,7 @@ fi IFNAME=$(ifconfig -a | grep -i '$mac' | cut -d ' ' -f 1) ## Rename this interface in modprobe.conf ## FIXME: if both interfaces startwith eth this is wrong -if [-x "/etc/modprobe.conf"]; then; +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 @@ -221,7 +221,7 @@ echo "$network via $router" >> $routesfile 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; +if [ -x "/etc/modprobe.conf" ]; then cat /etc/modprobe.conf.cobbler >> /etc/modprobe.conf rm -f /etc/modprobe.conf.cobbler fi
James Laska wrote:
snippets/post_install_network_config | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/snippets/post_install_network_config b/snippets/post_install_network_config index ec9f15e..6166a1d 100644 --- a/snippets/post_install_network_config +++ b/snippets/post_install_network_config @@ -34,7 +34,7 @@ #set $i = 0 ## setup bonding if we have to #if $numbondingdevs > 0 -if [-x "/etc/modprobe.conf"]; then; +if [ -x "/etc/modprobe.conf" ]; then echo "options bonding max_bonds=$numbondingdevs" >> /etc/modprobe.conf fi #end if @@ -78,7 +78,7 @@ mv /etc/sysconfig/network.cobbler /etc/sysconfig/network ## if this is a bonded interface, configure it in modprobe.conf #if $bonding.lower() == "master" ## Add required entry to modprobe.conf -if [-x "/etc/modprobe.conf"]; then +if [ -x "/etc/modprobe.conf" ]; then echo "alias $iname bonding" >> /etc/modprobe.conf.cobbler fi #end if @@ -88,7 +88,7 @@ fi IFNAME=$(ifconfig -a | grep -i '$mac' | cut -d ' ' -f 1) ## Rename this interface in modprobe.conf ## FIXME: if both interfaces startwith eth this is wrong -if [-x "/etc/modprobe.conf"]; then; +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 @@ -221,7 +221,7 @@ echo "$network via $router" >> $routesfile 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; +if [ -x "/etc/modprobe.conf" ]; then cat /etc/modprobe.conf.cobbler >> /etc/modprobe.conf rm -f /etc/modprobe.conf.cobbler fi
I'll apply this to master and devel branches alike Monday.
1.4 users will probably want to apply this themselves to /var/lib/cobbler/snippets/post_install_network_config.
Existing users won't have their kickstarts change because they will be using the non ".rpmnew" versions, so we'll include this in 1.4.1 when we decide to do it... I'll wait a week or so to see if we can roll up any other fixes, if needed.
Thanks!
--Michael
I'll apply this to master and devel branches alike Monday.
1.4 users will probably want to apply this themselves to /var/lib/cobbler/snippets/post_install_network_config.
Existing users won't have their kickstarts change because they will be using the non ".rpmnew" versions, so we'll include this in 1.4.1 when we decide to do it... I'll wait a week or so to see if we can roll up any other fixes, if needed.
Thanks!
--Michael
While this does actually make sure %post executes correctly, the test for modprobe.conf will probably always fail: it's not executable.
Patch: git://bender.newnewyork.nl/cobbler (branch: networking)
or: https://bender.newnewyork.nl/git/gitweb.cgi?p=cobbler/.git;a=commit;h=40e5ab...
Jasper
Jasper Capel wrote:
I'll apply this to master and devel branches alike Monday.
1.4 users will probably want to apply this themselves to /var/lib/cobbler/snippets/post_install_network_config.
Existing users won't have their kickstarts change because they will be using the non ".rpmnew" versions, so we'll include this in 1.4.1 when we decide to do it... I'll wait a week or so to see if we can roll up any other fixes, if needed.
Thanks!
--Michael
While this does actually make sure %post executes correctly, the test for modprobe.conf will probably always fail: it's not executable.
Patch: git://bender.newnewyork.nl/cobbler (branch: networking)
or: https://bender.newnewyork.nl/git/gitweb.cgi?p=cobbler/.git;a=commit;h=40e5ab...
Jasper _______________________________________________ cobbler mailing list cobbler@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler
Correct, this should be "exists".
Fortunately modprode.conf modifications are mainly only needed for bonding on EL 4 (EL 5 uses ifconfig, IIRC)
cobbler@lists.fedorahosted.org