0

i need to execute the following command on every startup

route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0

so i add it to rc.local

touch /var/lock/subsys/local

route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0

but i realise it is not being executed. Anyone knows what should it be.

1
  • 1
    Maybe this would be better in /etc/network/interfaces?
    – Kerrek SB
    Apr 2, 2012 at 9:03

1 Answer 1

0

What happens when you run same command from command line?

There are three reasons I can guess why it may not be working. 1) route is not in the sys path on bootup....try specifying full path to route command on your system. 2) eth0 is not available at the point in time rc.local is running .... Trying adding a print ifconfig in cr.local to test. 3) the route statement is invalid, and the route program is ignoring it...running from command line should tell you

1
  • There's also 4) The route add ... line is added after the line exit 0 in /etc/rc.local Apr 2, 2012 at 9:27

You must log in to answer this question.