Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 4092 - Error in the DHCPCD settings in the default /etc/init.d/net.eth0 script
Summary: Error in the DHCPCD settings in the default /etc/init.d/net.eth0 script
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-06-24 09:33 UTC by dynamotwain
Modified: 2003-02-04 19:42 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
The corrected /etc/init.d/net.eth0 file (net.eth0,3.20 KB, text/plain)
2002-06-24 09:34 UTC, dynamotwain
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dynamotwain 2002-06-24 09:33:43 UTC
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
Comment 1 dynamotwain 2002-06-24 09:34:27 UTC
Created attachment 1749 [details]
The corrected /etc/init.d/net.eth0 file
Comment 2 Martin Schlemmer (RETIRED) gentoo-dev 2002-06-28 15:23:34 UTC
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.
Comment 3 Yann Rouillard 2002-07-11 07:49:01 UTC
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

Comment 4 Martin Schlemmer (RETIRED) gentoo-dev 2002-07-11 14:07:11 UTC
Hi  Yann Rouillard

I think your script is a bit old ... The current do not do a "ifconfig down"
if dhcp is used.
Comment 5 Seemant Kulleen (RETIRED) gentoo-dev 2002-08-16 22:18:34 UTC
yann, geoffrey

is this still an issue?