udhcpc is disrespecting --retries, unless -n is passed as well

Denys Vlasenko vda.linux at googlemail.com
Thu Aug 8 07:54:00 UTC 2013


On Wed, Aug 7, 2013 at 2:08 AM, John Spencer
<maillist-busybox at barfooze.de> wrote:
> if that was the case, the fork-into-background option would be enabled by
> default.

??
It _is_ the default.


> if you want udhcpc to act as a daemon that regularly updates the lease, you
> should start it as such and set --retries 0 so that it additionally keeps on
> running and checking forever.
>
> it's a quite powerful tool usable in multiple different scenarios, so the
> options should do as they say instead of resulting in surprising behaviour.
>
> do you agree that the -n switch (which looks like an afterthought anyway) is
> redundant with --retries 0 ?
>
> old:
> loop forever: omit -n
> don't loop forever: -n -t maxtries (completely counterintuitive)
>
> new since 1c7a58dfb82ea04c525e0c19f94f2d800dee99e3
> loop forever: -t 0

It will loop forever with or without -t 0.
-t 0 merely makes it send discover packets ad infinitum,
never falling into '"leasefail", then retry or exit' code path.

-- 
vda


More information about the busybox mailing list