udhcpc is disrespecting --retries, unless -n is passed as well
John Spencer
maillist-busybox at barfooze.de
Thu Aug 8 08:28:43 UTC 2013
On 08/08/2013 09:48 AM, Denys Vlasenko wrote:
> On Tue, Aug 6, 2013 at 9:44 AM, John Spencer
> <maillist-busybox at barfooze.de> wrote:
>> udhpc is looping forever witout respecting the number of retries given.
>> only passing -n makes it exit after the max number of retries.
>
> $ udhcpc --help
> BusyBox v1.22.0.git (2013-07-30 11:58:43 CEST) multi-call binary.
>
> Usage: udhcpc [-fbnqvoCRB] [-i IFACE] [-r IP] [-s PROG] [-p PIDFILE]
> [-V VENDOR] [-x OPT:VAL]... [-O OPT]... [-P N]
>
> -i,--interface IFACE Interface to use (default eth0)
> -p,--pidfile FILE Create pidfile
> -s,--script PROG Run PROG at DHCP events (default
> /usr/share/udhcpc/default.script)
> -B,--broadcast Request broadcast replies
> -t,--retries N Send up to N discover packets
> -T,--timeout N Pause between packets (default 3 seconds)
> -A,--tryagain N Wait N seconds after failure (default 20)
> -f,--foreground Run in foreground
> -b,--background Background if lease is not obtained
> -n,--now Exit if lease is not obtained
> ...
>
> The "-t N" option doesn't say how many times to try acquiring
> the lease before exiting. It says how many discover packets to send.
>
>> this is pretty counterintuitive.
>
> How would you rephrase the help text to make it clearer?#
maybe something like this:
-t,--retries N Send up to N discover packets (add -n to exit after N
failures)
More information about the busybox
mailing list