--- /etc/init.d/autoconfig.orig 2008-04-11 18:47:12.000000000 +0200 +++ /etc/init.d/autoconfig 2008-04-11 18:48:05.000000000 +0200 @@ -386,14 +386,14 @@ if [ "${DHCP}" = "yes" ] then einfo "Network device ${HILITE}${nics}${NORMAL} detected, DHCP broadcasting for IP ..." - if [ -f /var/run/dhcpcd-${nics}.pid ] + if [ -z "$(/sbin/ifconfig ${nics} | grep 'inet addr')" ] then - if [ -z "$(/sbin/ifconfig ${nics} | grep 'inet addr')" ] + if [ -f /var/run/dhcpcd-${nics}.pid ] then kill $(cat /var/run/dhcpcd-${nics}.pid) sleep 2 - dhcpcd -n -h $(hostname) ${nics} fi + dhcpcd -n -h $(hostname) ${nics} fi fi done