Hi Jon,
It works!!! . I wonder why NM does not load the routes in the first
place..but anyway thanks!!
--khidzir
Jon Nettleton wrote:
On Wed, 2006-04-19 at 09:13 -0500, Aaron Konstam wrote:
On Wed, 2006-04-19 at 21:05 +0800, khidzir wrote:
Hi,
Greetings. After installing Network Manager, my static routes don't work
anymore. I'm using /etc/sysconfig/network-scripts/route-eth0 to define
those routes. Currently. I have to add it manually every time I rebooted
my laptop. Is there anythings that I missed out here?
Thanks.
Other than the file that determines static routes
is: /etc/sysconfig/network-scripts/ifup-routes (at least in FC5) I don't
know what to say.
Right now it is easiest to use NetworkManagerDispatcher for this.
1) As root create the directory /etc/NetworkManager/dispatcher.d
2) In that directory create a new file called staticroutes or whatever
you like.
3) You script should be something like this.
#!/bin/bash
if [ -x /usr/bin/logger ]; then
LOGGER="/usr/bin/logger -s -p user.notice -t
NetworkManagerDispatcher"
else
LOGGER=echo
fi
if [ ! -x /etc/sysconfig/network-scripts/ifup-routes ]; then
$LOGGER "script /etc/sysconfig/network-scripts/ifup-routes missing or
not executible"
return
fi
if [ -n $1 ] && [ $2 == "up" ]; then
$LOGGER "adding static routes for $1"
/etc/sysconfig/network-scripts/ifup-routes $1
fi
4) Chown the script to 700
5) Make sure that NetworkManagerDispatcher is running
chkconfig NetworkManagerDispatcher on
service NetworkManagerDispatcher start
I think that should be about it.,
Jon