summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authornate <nate@FreeBSD.org>1997-11-19 18:51:25 +0000
committernate <nate@FreeBSD.org>1997-11-19 18:51:25 +0000
commit77806b26e5ae22c00707c34ccad7b617889d0585 (patch)
tree0526bc6f57251978d3d4ed1f835c0a7e5d9649f3 /etc
parent753755c9432a4e540a27ea25e755d978ea950fa7 (diff)
downloadFreeBSD-src-77806b26e5ae22c00707c34ccad7b617889d0585.zip
FreeBSD-src-77806b26e5ae22c00707c34ccad7b617889d0585.tar.gz
- 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
Diffstat (limited to 'etc')
-rwxr-xr-xetc/pccard_ether15
1 files changed, 15 insertions, 0 deletions
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
OpenPOWER on IntegriCloud