Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 653968

Summary: net-misc/dhcpcd - enable support for configuring command_args in /etc/conf.d/dhcpcd
Product: Gentoo Linux Reporter: anonymous <fakih18716>
Component: Current packagesAssignee: William Hubbs <williamh>
Status: RESOLVED FIXED    
Severity: normal CC: base-system, roy
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: dhcpcd.conf
dhcpcd.log
Don't clobber command_args in init script

Description anonymous 2018-04-24 11:37:13 UTC
Currently, I have to modify /etc/init.d/dhcpcd directly or make a new init file.

It'd be useful to be able to change arguments to dhcpcd in /etc/conf.d/dhcpcd
Comment 1 Roy Marples 2018-04-25 12:32:49 UTC
Or maybe edit /etc/dhcpcd.conf?
That is actually the best approach as it works regardless of OS or init system used.
Comment 2 anonymous 2018-05-07 08:54:24 UTC
I added `waitip` to /etc/dhcpcd.conf, but it was not respected.
Comment 3 Roy Marples 2018-05-07 11:09:17 UTC
waitip by itself will just wait for *any* address to be assigned to the interface by dhcpcd. This includes a IPv4LL address. Why don't you also add debug to dhcpcd.conf and see what addressing dhcpcd is adding and if you don't like it then either exclude IPv4LL (noipv4ll) or include the protocol you want to wait for (waitip 6).
Comment 4 anonymous 2018-05-07 12:56:02 UTC
Specifying `--waitip` option made dhcpcd fork after getting a DHCP lease.
Comment 5 Roy Marples 2018-05-07 21:14:22 UTC
So that sounds like it's working?
You've not actually said what the problem is you're trying to fix.
Comment 6 anonymous 2018-05-08 10:35:29 UTC
I want lightdm to start after a DHCP lease is obtained.
If I modified /etc/init.d/dhcpcd to specify `--waitip`, /etc/init.d/dhcpcd forks after getting a DHCP lease.

If I put `waitip` in /etc/dhcpcd.conf, /etc/init.d/dhcpcd forks before getting a DHCP lease.
Comment 7 Roy Marples 2018-05-08 12:18:24 UTC
Lets find out why then. Add this to /etc/dhcpcd.conf

debug
logfile /var/log/dhcpcd.log

Reboot and attach the log file here.
Comment 8 anonymous 2018-05-08 12:50:09 UTC
Created attachment 530416 [details]
dhcpcd.conf
Comment 9 anonymous 2018-05-08 12:50:37 UTC
Created attachment 530418 [details]
dhcpcd.log
Comment 10 anonymous 2018-05-08 12:53:00 UTC
Also, in my case, /etc/conf.d/dhcpcd makes sense because keeping my dhcpcd configuraion separately from /etc/dhcpcd.conf enables me to avoid dealing with updates to /etc/dhcpcd.conf
Comment 11 Mike Gilbert gentoo-dev 2018-05-08 14:52:56 UTC
Created attachment 530426 [details, diff]
Don't clobber command_args in init script
Comment 12 Roy Marples 2018-05-09 13:24:18 UTC
OK.
The problem here is that because your DHCP server took to long to reply during boot and dhcpcd got an IPv4LL address, which satisfies the waitip check.

Adding noipv4ll to /etc/dhcpcd.conf wills solve this, which I did say earlier.