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
Or maybe edit /etc/dhcpcd.conf? That is actually the best approach as it works regardless of OS or init system used.
I added `waitip` to /etc/dhcpcd.conf, but it was not respected.
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).
Specifying `--waitip` option made dhcpcd fork after getting a DHCP lease.
So that sounds like it's working? You've not actually said what the problem is you're trying to fix.
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.
Lets find out why then. Add this to /etc/dhcpcd.conf debug logfile /var/log/dhcpcd.log Reboot and attach the log file here.
Created attachment 530416 [details] dhcpcd.conf
Created attachment 530418 [details] dhcpcd.log
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
Created attachment 530426 [details, diff] Don't clobber command_args in init script
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.