3 # $Id: pccard_ether,v 1.10 1999/02/10 18:08:16 jkh Exp $
5 # pccard_ether interfacename [ifconfig option]
7 # example: pccard_ether ep0 -link0
10 # Suck in the configuration variables
11 if [ -f /etc/defaults/rc.conf ]; then
12 . /etc/defaults/rc.conf
13 elif [ -f /etc/rc.conf ]; then
17 if [ "x$pccard_ifconfig" != "xNO" ] ; then
18 if [ "x$pccard_ifconfig" = "xDHCP" ] ; then
19 if [ -f /sbin/dhclient ] ; then
20 if [ -s /var/run/dhclient.pid ] ; then
21 kill `cat /var/run/dhclient.pid`
22 rm /var/run/dhclient.pid
25 elif [ -f /usr/local/sbin/dhcpc ] ; then
26 if [ -s /var/run/dhcpc.pid ] ; then
27 kill `cat /var/run/dhcpc.pid`
30 /usr/local/sbin/dhcpc $*
32 echo "DHCP client software not available (isc-dhcp2)"
37 ifconfig $interface $pccard_ifconfig $*
41 if [ "x$defaultrouter" != "xNO" ] ; then
42 static_routes="default ${static_routes}"
43 route_default="default ${defaultrouter}"
46 # Set up any static routes.
47 if [ "x${static_routes}" != "x" ]; then
48 # flush beforehand, just in case....
51 for i in ${static_routes}; do
52 eval route_args=\$route_${i}
53 route add ${route_args}