Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 165841 - make -1 flag to dhclient configurable
Summary: make -1 flag to dhclient configurable
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-07 22:29 UTC by Jenkler
Modified: 2007-02-09 10:23 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jenkler 2007-02-07 22:29:54 UTC
Dhclient don't recover after network cable has been disconnected for a while

In file: /lib/rcscripts/net/dhclient.sh:
on line: 109

is it possible to remove the static entry of -1 when starting dhclient

 --pidfile "${pidfile}" -- ${opts} -q -1 -pf "${pidfile}" "${iface}"

should be 

 --pidfile "${pidfile}" -- ${opts} -q -pf "${pidfile}" "${iface}"



DESC in manpage
The -1 flag cause dhclient to try once to get a lease.  If it fails, dhclient exits with exit code two.

it should be away to disable this flag or if it could be removed compleatly



Reproducible: Always

Steps to Reproduce:
1. config dhclient in net modules=("dhclient")
2. start eth0 and remove the cable 
3. dhclient will die compleatly in about 1 hour if the -1 is in options

Actual Results:  
if running server, you need to restart net.eth0

Expected Results:  
wait for network to come back
Comment 1 Roy Marples (RETIRED) gentoo-dev 2007-02-09 10:23:53 UTC
However, our network scripts need to know that the dhcp attempt has failed.

Instead, use ifplugd or netplugd to manage your wired connection. When the cable is plugged back in, it will re-launch your dhcp client of choice.