[Dextrose] ip route in rc.sysinit

Jon Nettleton jon.nettleton at gmail.com
Mon Aug 9 17:11:44 EDT 2010

>> El Mon, 09-08-2010 a las 16:33 -0300, Esteban Bordon escribió:
>> > Hi all,
>> >
>> > I have a script that execute ip route to get the default gateway. If I
>> > run the script when sugar has started works fine, but, I need to run
>> > it during boot. I added a line in rc.sysinit calling it, but ip route
>> > doesn't prints any data. I tried to add the line in /etc/rc (like I
>> > used to in F9-0.82) and it neither prints the route.
>> >
>> > Any idea?

You can add a script to /etc/NetworkManager/dispatcher.d that will be
run after NetworkManager brings up a connection.

call it 00-default-route and make sure it is executable.

Something like this will work.


export LC_ALL=C

if [ "$2" = "up" ]; then
	/sbin/ip route add default via XXX.XXX.XXX.XXX dev "$1"

Hope that helps.

More information about the Dextrose mailing list