#!/bin/sh
#
#	This script will configure network interfaces, VLAN's, and routes
#


start() {
	logger -s -p "user.info" -t "$0" "Configuring network"

# lo BEGIN

	# loopback interface

	ip addr add 127.0.0.1/8 dev lo
	ip link set lo up

# lo END

# ETH0 BEGIN
ip address add dev eth0 local 192.168.0.111/24
ip link set eth0 up

# additional addresses


# VLAN


ip route add default via 192.168.0.1

# ETH0 END

}



stop() {
	logger -s -p "user.info" -t "$0" "Taking network down"
}



case "$1" in
  start)
    start
    ;;
  stop)
    stop
    ;;
  restart|reload)
    $0 stop
    $0 start
    ;;
  *)
    echo $"Usage: $0 {start|stop|restart}"
    exit 1
esac

exit $?
