#!/bin/sh

#     DESCRIPTION
#
# Use dhcp for all network interfaces.
# Interface must be pluged.


#     REQUIRES
#
# Nothing


#     INFO
#
# USE_HOTPLUG
# If  set to yes, iface will be skipped during boot.  Note that standard hotplug calls /sbin/ifup and /sbin/ifdown.  This should be
# changed to /etc/net/scripts/ifup-removable and /etc/net/scripts/ifdown-removable respectively, if you wish  to  use  etcnet  from
# hotplug.

NAME="init1-fstab"

verbose()
{
    if [ -n "$GLOBAL_VERBOSE" ]; then
        echo "HOOK: $NAME: $@"
    fi
}

verbose "has started"

subst 's/USE_IFPLUGD=no/USE_IFPLUGD=yes/' /etc/net/ifaces/default/options-eth
echo "BOOTPROTO=dhcp">> /etc/net/ifaces/default/options-eth
echo "USE_HOTPLUG=yes">> /etc/net/ifaces/default/options-eth

verbose "finished"
