5 # pccard_ether interfacename [start|stop|restart]
7 # example: pccard_ether fxp0 start
14 start_precmd="checkauto"
15 start_cmd="pccard_ether_start"
16 stop_precmd="checkauto"
17 stop_cmd="pccard_ether_stop"
18 restart_precmd="checkauto"
19 restart_cmd="pccard_ether_restart"
23 # Add default route into $static_routes
24 case ${defaultrouter} in
28 static_routes="default ${static_routes}"
29 route_default="default ${defaultrouter}"
33 # Add private route for this interface into $static_routes
34 eval ifx_routes=\$static_routes_${ifn}
35 if [ -n "${ifx_routes}" ]; then
36 static_routes="${ifx_routes} ${static_routes}"
39 # Set up any static routes if specified
40 if [ -n "${static_routes}" ]; then
41 for i in ${static_routes}; do
42 eval route_args=\$route_${i}
43 route add ${route_args}
50 # Delete static route if specified
51 eval ifx_routes=\$static_routes_${ifn}
52 if [ -n "${ifx_routes}" ]; then
53 for i in ${ifx_routes}; do
54 eval route_args=\$route_${i}
55 route delete ${route_args}
62 if [ -z "$rc_force" ]; then
63 # Ignore interfaces with the NOAUTO keyword
70 if [ -z "$rc_force" -a -x /usr/bin/grep ]; then
71 if ifconfig $ifn | grep -s '[<,]UP[,>]' > /dev/null 2>&1; then
72 # Interface is already up, so ignore it.
77 /etc/rc.d/netif start $ifn
79 # Do route configuration if needed.
80 # XXX: should probably do this by calling rc.d/routing.
81 if [ -n "`ifconfig_getargs $ifn`" ]; then
82 if ! dhcpif $ifn; then
88 if checkyesno ipv6_enable; then
89 network6_interface_setup $ifn
95 if [ -n "`ifconfig_getargs $ifn`" ]; then
96 if ! dhcpif $ifn; then
101 /etc/rc.d/netif stop $ifn
106 # Clean the routing table
107 if checkyesno removable_route_flush; then
108 route -n flush -inet > /dev/null
112 pccard_ether_restart()
114 # Hand implemented because the default implementation runs
115 # the equivalent of "$0 start; $0 stop" and this script
116 # doesn't support that syntax
129 load_rc_config pccard_ether