The stop() function uses /sbin/dhcpcd -k ${IFACE} to kill the dhcpcd, but that causes the dhcpcd to release the ip address, which causes some routers to set the IP address as expired, and wastes IP addresses. According to the dhcpcd documentation, SIGTERM should be sent to dhcpcd on shutdown, not the SIGHUP that the -k option sends. However, dhcpcd automatically creates a /var/run/dhcpcd-$IFACE.pid file that can be used in conjunction with kill to send SIGTERM
Created attachment 1749 [details] The corrected /etc/init.d/net.eth0 file
Verify that this is correct, and works, and Ill fix it (I dont use DHCP here). Maybe at least 2 other DHCP users this should work for.
I am not sure that we must send a SIGTERM instead of a SIGHUP because, with SIGTERM the lease is not released. On the page linked from the dhcpcd homepage ( http://www.scrounge.org/linux/dhcpcd.html ). The method used to shutdown is the "-k flag". Anyway I think that, like in the corrected script, the "sbin/ifconfig ${IFACE} down &>/dev/null" line must only executed if dhcpcd is not used () and certainly not before because it causes the following errors: dhcpcd[1527]: dhcpRelease: sendto: Network is down dhcpcd[1527]: arpRelease: sendto: Network is down
Hi Yann Rouillard I think your script is a bit old ... The current do not do a "ifconfig down" if dhcp is used.
yann, geoffrey is this still an issue?