#!/bin/sh - # # pccard_ether interfacename [ifconfig option] # # example: pccard_ether ep0 link1 # # HOSOKAWA, Tatsumi # # Suck in the /etc/sysconfig variables if [ -f /etc/rc.conf ]; then . /etc/rc.conf fi interface=$1 shift if [ "x$pccard_ether" != "xNO" ] ; then eval ifconfig_args=\$ifconfig_${interface} if [ "x$ifconfig_args" = "xDHCP" ] ; then /usr/local/sbin/dhcpc $dhcp_flags $interface else if [ "x$ifconfig_args" != "xNO" ] ; then ifconfig $interface $ifconfig_args $* fi fi fi if [ -n "$defaultrouter" -a "x$defaultrouter" != "xNO" -a "x$ifconfig_args" != "xDHCP" ] ; then static_routes="default ${static_routes}" route_default="default ${defaultrouter}" fi # Set up any static routes. This should be done before router discovery. if [ "x${static_routes}" != "x" ]; then route -n flush for i in ${static_routes}; do eval route_args=\$route_${i} route add ${route_args} done fi