pccard_ether revision 31793
1#!/bin/sh - 2# 3# pccard_ether interfacename [ifconfig option] 4# 5# example: pccard_ether ep0 -link0 6# 7 8# Suck in the /etc/rc.conf variables 9if [ -f /etc/rc.conf ]; then 10 . /etc/rc.conf 11fi 12 13if [ "x$pccard_ifconfig" != "xNO" ] ; then 14 if [ "x$pccard_ifconfig" = "xDHCP" ] ; then 15 if [ -f /usr/local/sbin/dhclient ] ; then 16 if [ -s /var/run/dhclient.pid ] ; then 17 kill `cat /var/run/dhclient.pid` 18 rm /var/run/dhclient.pid 19 fi 20 /usr/local/sbin/dhclient 21 else 22 echo "DHCP client software not available (isc-dhcp2)" 23 fi 24 else 25 interface=$1 26 shift 27 ifconfig $interface $pccard_ifconfig $* 28 fi 29fi 30 31if [ "x$defaultrouter" != "xNO" ] ; then 32 static_routes="default ${static_routes}" 33 route_default="default ${defaultrouter}" 34fi 35 36# Set up any static routes. 37if [ "x${static_routes}" != "x" ]; then 38 # flush beforehand, just in case.... 39 route -n flush 40 arp -d -a 41 for i in ${static_routes}; do 42 eval route_args=\$route_${i} 43 route add ${route_args} 44 done 45fi 46