#!/bin/sh

IFUP=/sbin/ifup
IFDOWN=/sbin/ifdown

case "$1" in
	start)
		if [ -f /etc/hostname ]; then
			hostname `cat /etc/hostname` >/dev/null 2>&1
		fi

		echo -n "Configuring network interfaces: "
		$IFDOWN -a
		if $IFUP -a; then
			echo "done"
		else
			echo "failed"
			exit 1
		fi
	;;
	stop)
		$IFDOWN -a
	;;
	*)
	;;
esac

