#! /bin/sh
#
# Wireless config
ifconfig eth0 up
#iwconfig eth0 essid MyLan key s:MyK3yH3r3

#IP="1.2.3.4" 
#MASK="255.255.255.0"
#GATEWAY="1.2.3.1"

DHCP="/sbin/udhcpc" # or "NONE"

if [ $1 = "start" ]; then
	if [ -x $DHCP ]; then
		$DHCP $2
	else
		ifconfig $2 $IP netmask $MASK up
		route add default gw $GATEWAY
	fi
else
	shift
	ifconfig $1 down
fi
exit 0
