Re: adding extra network routes
On Mon, Jan 12, 2004 at 02:27:49PM +0300, Alphonse Ogulla wrote:
> The last three lines are repeated five times. This brings me to my
> question. Where should I put my one line script 'route00' in order
> to add an extra route to a network without seeing the above errors
> on startup?
A few thoughts...
Test $IFACE and exit the script appropriately.
#!/bin/sh
[ "$IFACE" = "eth0" ] || exit
route add -net 192.168.1.0 netmask 255.255.255.0 dev eth0
Add the line directly to your /etc/network/interfaces stanza.
auto eth0
iface eth0 inet dhcp
up route add -net 192.168.1.0 netmask 255.255.255.0 dev eth0
Or a variation of the last one. Run the script from somewhere
other than the .d/ directories.
auto eth0
iface eth0 inet dhcp
up /path/to/my/script
Reply to: