#!/bin/sh

start() {
	echo "network: Starting..."
	ifplugd -i eth0 -fI -r /etc/ifplugd/ifplugd.action
	ifconfig eth0 up
}
stop() {
	echo "network: Stopping..."
	ifplugd -i eth0 -k
	ifconfig eth0 down
}
restart() {
	stop
	start
}

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

exit $?
