From 77806b26e5ae22c00707c34ccad7b617889d0585 Mon Sep 17 00:00:00 2001 From: nate Date: Wed, 19 Nov 1997 18:51:25 +0000 Subject: - Setup a default route (if one is set) when the card is inserted. This needs to be re-thought, but should work better for 95% of the users. Stolen from: rc.network --- etc/pccard_ether | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'etc/pccard_ether') diff --git a/etc/pccard_ether b/etc/pccard_ether index b79262312..b8a6c59 100755 --- a/etc/pccard_ether +++ b/etc/pccard_ether @@ -19,3 +19,18 @@ if [ "x$pccard_ifconfig" != "xNO" ] ; then ifconfig $interface $pccard_ifconfig $* fi fi + +if [ "x$defaultrouter" != "xNO" ] ; then + static_routes="default ${static_routes}" + route_default="default ${defaultrouter}" +fi + +# Set up any static routes. +if [ "x${static_routes}" != "x" ]; then + # flush beforehand, just in case.... + route -n flush + for i in ${static_routes}; do + eval route_args=\$route_${i} + route add ${route_args} + done +fi -- cgit v1.1