[PATCH 1/2] wget: make default timeout configurable, remove a duplicate line
Tito
farmatito at tiscali.it
Fri Oct 18 09:52:45 UTC 2013
On Friday 18 October 2013 11:00:12 Harald Becker wrote:
> Hi Lauri !
>
> >> >> GNU wget does kinda cater to this use: you can specify it in
> >> >> the .wgetrc file, but then that's only portable to GNU wget.
> >> >How about adding limited support for .wgetrc then (only for
> >> >timeouts)?
> >> Support for .wgetrc is much bloat. What about looking for
> >> environment variable WGET_TIMEOUT? Ok it is not compatible with
> >> other other wget versions, but BB wget isn't neither.
> >
> >Checking for an env var would be more size.
>
> More size than compile time constant, but much less then
> supporting a ".wgetrc" file.
>
> >Having it as a compile-time configure option means no size
> >change, and we don't need the default to change at runtime.
>
> ... but you need to think about this timeout before building
> Busybox and can't change that afterward in runtime environment.
> So another option to think about before build, you actually don't
> care during first config. And as soon as you use Busybox wget
> and know the value, you need to reconfigure/build.
>
> IMO it is best to have a sane, all purpose compile time constant,
> and the possibility to overwrite this constant during runtime
> with an environment variable.
>
> There is nothing wrong to have such a constant as a #define at
> start of the applet source, but do we pollute the configuration
> step with this constant?
>
Hi,
can the wget scripts not be modified like
[ -r /etc/default/wget.conf ] && . /etc/default/wget.conf
wget -t $WGET_TIMEOUT
Ciao,
Tito
More information about the busybox
mailing list