#set -x
CONFIG=/flash/.$1
if [ ! -e $CONFIG ]; then
        echo "To change the default $1 configuration, create and populate $CONFIG"
        echo "IPADDR=<$1 IP Address>"
        echo "NETMASK=<$1 dotted mask>"
        exit 1
fi
# source the config file
. $CONFIG
echo "Configuring $1"
IFACE=$1
# sanity check for IPADDR and NETMASK set to something -- no more error checks!
if [ -n "$IPADDR" ] && [ -n "$NETMASK" ]; then
        # we're attempting reconfiguration, so delete any existing default route
        # set the new parameters
        ifconfig $IFACE $IPADDR netmask $NETMASK
fi
# ensure this script returns true
/bin/true

