5 # pccard_ether interfacename [start|stop] [ifconfig option]
7 # example: pccard_ether ep0 start -link0
11 if [ -r /sbin/dhclient ]; then
12 pidfile="/var/run/dhclient.${interface}.pid"
13 if [ -s ${pidfile} ]; then
17 elif [ -r /usr/local/sbin/dhcpc ]; then
18 pidfile="/var/run/dhcpc.${interface}.pid"
19 if [ -s ${pidfile} ]; then
28 if [ -r /sbin/dhclient ]; then
29 pidfile="/var/run/dhclient.${interface}.pid"
30 /sbin/dhclient -pf ${pidfile} $interface
31 elif [ -r /usr/local/sbin/dhcpc ]; then
32 /usr/local/sbin/dhcpc $interface
34 echo "DHCP client software not available (isc-dhcp2)"
38 # Suck in the configuration variables
40 if [ -r /etc/defaults/rc.conf ]; then
41 . /etc/defaults/rc.conf
43 elif [ -r /etc/rc.conf ]; then
53 [Ss][Tt][Aa][Rr][Tt] | '')
54 case ${pccard_ifconfig} in
61 ifconfig ${interface} ${pccard_ifconfig} $*
65 case ${defaultrouter} in
69 static_routes="default ${static_routes}"
70 route_default="default ${defaultrouter}"
74 # Set up any static routes.
76 if [ -n "${static_routes}" ]; then
77 # flush beforehand, just in case....
80 for i in ${static_routes}; do
81 eval route_args=\$route_${i}
82 route add ${route_args}
87 case ${ipv6_enable} in
89 case ${ipv6_gateway_enable} in
93 sysctl -w net.inet6.ip6.forwarding=0
94 sysctl -w net.inet6.ip6.accept_rtadv=1
95 ifconfig ${interface} up
104 /sbin/ifconfig ${interface} delete