dhcpcd icon indicating copy to clipboard operation
dhcpcd copied to clipboard

Waiting for carrier blocks timeout

Open holmanb opened this issue 1 year ago • 5 comments

Problem:

--timeout isn't respected when no carrier has been acquired

I see:

# dhcpcd --nobackground --ipv4only --oneshot --waitip=4 --persistent --timeout=5 --debug wlo1
dhcpcd-10.0.5 starting
DUID 00:01:00:01:2d:1e:ed:87:b6:18:32:62:ff:1a
wlo1: executing: /lib/dhcpcd/dhcpcd-run-hooks PREINIT
wlo1: executing: /lib/dhcpcd/dhcpcd-run-hooks NOCARRIER
Dropped protocol specifier '.link' from 'wlo1.link'. Using 'wlo1' (ifindex=3).
wlo1: waiting for carrier

I would expect the timeout ideally to be respected, or at the very least document this behavior.

holmanb avatar Dec 27 '23 14:12 holmanb

I'm thinking about removing the timeout option as it becomes meaningless when #271 happens.

rsmarples avatar Dec 28 '23 01:12 rsmarples

@holmanb once #271 happens the --oneshot option would be removed as well, but you used it in your example. Do you have a rationale for it?

rsmarples avatar Dec 30 '23 08:12 rsmarples

@rsmarples Thanks for the reply and followup.

Using --oneshot for synchronous dhcp address assignment to a single interface by other tools. For example initramfs-tools recently replaced their isc dependency with dhcpcd using --oneshot. Do you have a proposal for how one might do this that works under current and future dhcpcd plans?

holmanb avatar Dec 30 '23 14:12 holmanb

Ok, that's a good enough reason to keep it. I'll add that the fine man page.

rsmarples avatar Dec 30 '23 16:12 rsmarples

Ok, that's a good enough reason to keep it. I'll add that the fine man page.

Thanks @rsmarples. I have more questions regarding #271, but will continue the conversation here.

holmanb avatar Jan 02 '24 19:01 holmanb