freebsd-dev/etc/pccard_ether
Nate Williams 51d18e4a08 - In addtition to flushing the routes, also flush the arp cache when bringing
up the new network link.

Submitted by:	Guido van Rooij <guido@gvr.org>
1997-11-20 22:31:11 +00:00

38 lines
759 B
Bash
Executable File

#!/bin/sh -
#
# pccard_ether interfacename [ifconfig option]
#
# example: pccard_ether ep0 -link0
#
# Suck in the /etc/rc.conf variables
if [ -f /etc/rc.conf ]; then
. /etc/rc.conf
fi
if [ "x$pccard_ifconfig" != "xNO" ] ; then
if [ "x$pccard_ifconfig" = "xDHCP" ] ; then
# DHCP currently not implemented
else
interface=$1
shift
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
arp -d -a
for i in ${static_routes}; do
eval route_args=\$route_${i}
route add ${route_args}
done
fi