#!/bin/sh
#
# Start the network....
#

if grep -q '/ nfs' /proc/mounts; then
	echo "Running via NFS: leaving eth0 config alone"
	exit 0
fi

if grep -v '#' /etc/network/interfaces | grep -q 'eth0.*dhcp'; then
    # run dhcp client in background, as ifup would run in one-shot mode
    udhcpc -b -i eth0
else
    # ifup to use static parameters from /etc/netwrok/interfaces
    ifup eth0
fi
