--- net.eth1.old 2005-05-10 09:26:01.000000000 +0200 +++ net.eth0 2005-05-10 09:39:23.000000000 +0200 @@ -238,14 +238,12 @@ # Stop DHCP (should be N/A for aliases) # Don't trust current configuration... investigate ourselves - if /sbin/dhcpcd -z ${i} &>${devnull}; then + if [ -e /var/run/dhcpcd-${IFACE}.pid ]; then ebegin " Releasing DHCP lease for ${IFACE}" - for ((count = 0; count < 9; count = count + 1)); do - /sbin/dhcpcd -z ${i} &>${devnull} || break - sleep 1 - done - [[ ${count} -lt 9 ]] - eend $? "Timed out" + # Use kill in favour of dhcpcd -z so IP address is only reused + # by the server if there are not enough adresses in the network. + kill `cat /var/run/dhcpcd-${IFACE}.pid` &>${devnull} + eend $? fi ebegin " Stopping ${i}" ifconfig ${i} down &>${devnull}