summaryrefslogtreecommitdiffstats
path: root/etc/pccard_ether
blob: b8a6c591fa549d724d184577b6dba79a475765fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh -
#
# pccardether interfacename [ifconfig option]
#
# example: pccardether ep0 -link0
#

# Suck in the /etc/rc.conf variables
if [ -f /etc/rc.conf ]; then
	. /etc/rc.conf
fi

if [ "x$pccard_ifconfig" != "xNO" ] ; then
	if [ "x$pccard_ifconfig" = "xDHCP" ] ; then
		# DHCP currently not implemented
	else
		interface=$1
		shift
		ifconfig $interface $pccard_ifconfig $*
	fi
fi

if [ "x$defaultrouter" != "xNO" ] ; then
	static_routes="default ${static_routes}"
	route_default="default ${defaultrouter}"
fi
    
# Set up any static routes.
if [ "x${static_routes}" != "x" ]; then
	# flush beforehand, just in case....
        route -n flush
	for i in ${static_routes}; do
		eval route_args=\$route_${i}
		route add ${route_args}
	done
fi
OpenPOWER on IntegriCloud