[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: udhcpc is disrespecting --retries, unless -n is passed as well
From: John Spencer <maillist-busybox () barfooze ! de>
Date: 2013-08-08 17:32:57
Message-ID: 5203D649.3040809 () barfooze ! de
[Download RAW message or body]
On 08/08/2013 12:35 PM, Denys Vlasenko wrote:
> On Thu, Aug 8, 2013 at 10:28 AM, John Spencer
> <maillist-busybox@barfooze.de> wrote:
>>> 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)
>
> I changed --help to read like this:
>
> Usage: udhcpc [-fbqvaoCRB] [-t N] [-T SEC] [-A SEC/-n]
> [-i IFACE] [-P PORT] [-r IP] [-s PROG] [-p PIDFILE]
> [-V VENDOR] [-x OPT:VAL]... [-O OPT]...
>
> -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 (default 3)
> -T,--timeout SEC Pause between packets (default 3)
> -A,--tryagain SEC Wait after failure (default 20)
> -n,--now Exit if lease is not obtained
> -q,--quit Exit after obtaining lease
> -R,--release Release IP on exit
> -f,--foreground Run in foreground
> -b,--background Background if lease is not obtained
> -S,--syslog Log to syslog too
> -P,--client-port PORT Use PORT (default 68)
> -a,--arping Use arping to validate offered address
> -O,--request-option OPT Request option OPT from server (cumulative)
> -o,--no-default-options Don't request any options (unless -O is given)
> -r,--request IP Request this IP address
> -x OPT:VAL Include option OPT in sent packets (cumulative)
> Examples of string, numeric, and hex byte opts:
> -x hostname:bbox - option 12
> -x lease:3600 - option 51 (lease time)
> -x 0x3d:0100BEEFC0FFEE - option 61 (client id)
> -F,--fqdn NAME Ask server to update DNS mapping for NAME
> -V,--vendorclass VENDOR Vendor identifier (default 'udhcp VERSION')
> -C,--clientid-none Don't send MAC as client identifier
> -v Verbose
> Signals:
> USR1 Renew lease
> USR2 Release lease
>
>
>
> the "[-A SEC/-n]" part, hopefully, shows that either retry or exit
> after failure can be specified.
>
that doesn't help. my brain works like: need to found out how to set
number of tries, search for line containing tries, read it, dont look at
anything else, since it usually is irrelevant.
did you ever read carefully a full page of option switches when you were
after a single one ?
we need the hint in the very same line to not fool the user.
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic