DEVICE=eth0
AUTOSTART=yes
#BOOTPROTO="dhcp-b -m180 -s /usr/share/udhcpc/aliases.script" #dhcp in background, renew every 3 min
BOOTPROTO=dhcp
DHCPNAME=`cat /etc/HOSTNAME`

IPADDR=192.168.0.50    #use this configuration if dhcp fails
GATEWAY=192.168.0.1   #no GATEWAY so pppd can configure one
BROADCAST=192.168.0.255
NETWORK=192.168.0.0
NETMASK=255.255.255.0

shortName=`echo $DCHPNAME | cut -d. -f1`
[ "$shortName" = "$DHCPNAME" ] && unset shortName

hosts() {
  cat <<EOS #add IP addresses for LAN neighbors to this table
127.0.0.1   localhost
$IPADDR  $DHCPNAME $shortName
EOS
}

resolv_conf() {
 :  #clear resolv.conf on dhcp deconfig event
}

NSprepCmd="hosts > $HOSTS"  #run after interface comes up
#if ppp is running, restart it
[ -r /var/run/ppp0.pid ] &&
  NSprepCmd="ifdown ppp0; $NSprepCmd; sleep 2; ifup ppp0"
