--- a/etcnet/etc/net/scripts/functions +++ a/etcnet/etc/net/scripts/functions @@ -507,9 +507,13 @@ stop_dhcp_client() ;; esac if [ -s $PIDFILE ]; then - kill -SIGHUP `cat $PIDFILE` - # There probably should be a delay/wait loop here, dhcpcd doesn't die fast. - sleep ${DHCP_GRACE_TIME:-0} + local pid=`cat $PIDFILE` + local i=0 + kill -SIGHUP $pid + while [ "$i" -lt "${DHCP_GRACE_TIME:-0}" ] && kill -0 $pid 2>/dev/null; do + sleep 1 + i=$(($i + 1)) + done # dhcpcd will bring down the interface when stopping. To keep etcnet logics # to work (running shutdown scripts for example) we should bring it up again $IP link set dev $NAME up