5 # pccard_ether interfacename [start|stop]
7 # example: pccard_ether fxp0 start
15 err 3 'USAGE: $0 interface (start|stop)'
23 # Ignore interfaces not in removable_interfaces
24 expr "${removable_interfaces}" : ".*${ifn}" > /dev/null || exit 0
32 # Add default route into $static_routes
33 case ${defaultrouter} in
37 static_routes="default ${static_routes}"
38 route_default="default ${defaultrouter}"
42 # Add private route for this interface into $static_routes
43 eval ifx_routes=\$static_routes_${ifn}
44 if [ -n "${ifx_routes}" ]; then
45 static_routes="${ifx_routes} ${static_routes}"
48 # Set up any static routes if specified
49 if [ -n "${static_routes}" ]; then
50 for i in ${static_routes}; do
51 eval route_args=\$route_${i}
52 route add ${route_args}
59 # Delete static route if specified
60 eval ifx_routes=\$static_routes_${ifn}
61 if [ -n "${ifx_routes}" ]; then
62 for i in ${ifx_routes}; do
63 eval route_args=\$route_${i}
64 route delete ${route_args}
69 load_rc_config pccard_ether
72 [Ss][Tt][Aa][Rr][Tt] | '')
73 if [ -x /usr/bin/grep ]; then
74 if ifconfig $ifn | grep -s netmask > /dev/null 2>&1; then
75 # Interface is already up, so ignore it.
80 /etc/rc.d/netif start $ifn
82 # Do route configuration if needed.
83 # XXX: should probably do this by calling rc.d/routing.
84 if [ -n "`ifconfig_getargs $ifn`" ]; then
85 if ! dhcpif $ifn; then
91 if checkyesno ipv6_enable; then
92 network6_interface_setup $ifn
98 if [ -n "`ifconfig_getargs $ifn`" ]; then
99 if ! dhcpif $ifn; then
104 /etc/rc.d/netif stop $ifn
109 # Clean the routing table
110 if checkyesno removable_route_flush; then
111 route -n flush -inet > /dev/null