Hi,
NetworkManager does not look up GATEWAY under
/etc/sysconfig/network. Instead it creates rather funny default routes
pointing the traffic back to the host itself (for static setups, dhcp
works better with NetworkManager).
This should be fixed in NetworkManager and I filed a bug for it, but
until then the following workaround seems to work OK:
--- /var/lib/cobbler/snippets/post_install_network_config.org 2008-12-30
18:24:32.000000000 +0200
+++ /var/lib/cobbler/snippets/post_install_network_config 2008-12-30 22:21:52.000000000
+0200
@@ -116,6 +116,9 @@
#set $netmask = "255.255.255.0"
#end if
echo "NETMASK=$netmask" >> $devfile
+if [ "`ipcalc --network $ip $netmask`" = "`ipcalc --network $gateway
$netmask`" ]; then
+ echo "GATEWAY=$gateway" >> $devfile
+fi
#else
## Leave the interface unconfigured
## we don't have enough info for static configuration
This is not very elegant, as the test is performed by the installing
host and not by the cobbler server in advance, but my Cheetah skills
are limited (couldn't find out how to have an external call to ipcalc
from Cheetah).
Furthermore it would plant a GATEWAY onto each and every interface in
the subnet of the default router, which would probably not work, so
maybe it needs some singleton guardian.
Alternatively I've been using
chkconfig network on
chkconfig NetworkManager off
in the %post section to not trigger this bug.
Could you apply the above patch or maybe some more elegant solution?
Thanks!
--
Axel.Thimm at
ATrpms.net