"ip route flush table main" doesn't work correctly from rc.local?
Ubuntu Server 10.10
/etc/rc.local is running a script which starts like this: Code:
ip route flush table main # clears any unwanted default routes The only way this makes sense to me is if rc.local is being executed before those routes are being written to the table. But as I understand things rc.local is among the last things done in the boot process...so that doesn't really make sense. What is going on here? If it helps this script is for an oddball appliance I am building. In many scenarios the appliance will have two or more interfaces on the same subnet. One interface will act as the gateway and have Code:
default via $GW dev $ADMIN_IFACE The rest of the script after, the "ip route flush" command builds the routing table that I need then applies a firewall. An alternate question to the "what is going on here?" is, is there someway for me to control the default routes linux creates so I don't have to flush and build my own every boot? |
All times are GMT -5. The time now is 03:40 AM. |