My system requires that, in addition to the two IP addresses assigned to my NIC (eth0), I also establish an extra "route." The command that I've been using to provide this route is: route add -net 10.1.0.0 netmask 255.255.0.0 gw 172.30.30.1 dev eth0 Previously, there wasn't any way to automate this via the /etc/conf.d/net and /etc/init.d/net.eth0 scripts, so I've created a patch which will do what I want. Basically, using my patch, you could add these three lines to /etc/conf.d/net to achieve my desired result: route_eth0="10.1.0.0" route_netmask_eth0="255.255.0.0" route_gateway_eth0="172.30.30.1" If more than one route is desired, you can add more values with spaces (similar to how aliases are currently handled), like so: route_eth0="10.1.0.0 10.2.0.0" route_netmask_eth0="255.255.0.0 255.255.0.0" route_gateway_eth0="172.30.30.1 172.30.30.2" The enhancements to /etc/init.d/net.eth0 save all three of those lines as "options" inside /mnt/.init.d, but I couldn't think of a better way to safely remove all the route information. However, one could certainly argue that there's no real need to manually take down the routes when eth0 is brought down because the routes will just disappear anyway if eth0 comes down. So I can submit a different patch if it's decided that there's no need to store this information. I've created the patch based off of /usr/portage/sys-apps/baselayout/files/rc-scripts-1.4.1.tar.bz2, which is the latest version of the rc-scripts available currently. It will apply cleanly to this package. As always, comments and suggestions welcome.
Created attachment 4867 [details, diff] rcscripts-extra-routes.patch This is the patch. Untar rc-scripts-1.4.1.tar.bz2 and then apply.
It makes things too complex. net.eth0 is already too complex. Our official standing is to keep things simple, but sufficient for the avarage user, yet not too complex so that he cannot change it to suite his needs/liking. And with CONFIG_PROTECT, you can rest asure that your changes will not be blown away.
Groovy. I'll just post it to the forums under Tips+Tricks or something, in case somebody else needs this functionality...