* Jonathan McCrohan <jmccro...@gmail.com> [31.12.2012 14:40]:

> > why does it fail?
> 
> It fails because they behave differently. ddns-scripts was written with

[...]
 
> As SSL dynamic DNS updates use cURL, there should be *no* reason for GNU
> Wget to be used in preference to BusyBox Wget. BusyBox Wget is
> default=y, and hence, should always be available.

this is only correct in the short run.
maybe OpenWrt will switch to toybox later.

> [1] busybox wget 
> http://user:p...@dyn.dns.he.net/nic/update?hostname=example.org&myip=10.0.0.1 
> # BusyBox Wget
> 
> [2] wget 
> http://user:p...@dyn.dns.he.net/nic/update?hostname=example.org&myip=10.0.0.1 
> # GNU Wget
> 
> [3] wget --user=user --password=password 
> http://dyn.dns.he.net/nic/update?hostname=example.org&myip=10.0.0.1 # GNU 
> Wget with explicit user and password definitions
> 
> [4] wget --no-http-keep-alive 
> http://user:p...@dyn.dns.he.net/nic/update?hostname=example.org&myip=10.0.0.1 
> # GNU Wget without HTTP keep-alive
 
i understand the examples and the problem.
it is possible to configure busybox wget to behave like GNU wget
with CONFIG_FEATURE_WGET_AUTHENTICATION=y but i dont like the idea to
bloat the default config by simply switching it on. so we have to diff
between both characteristics. sadly, there seems to be no good way
to distinguish between the wget versions, so i propose this:

if wget --version 2>/dev/null | grep -q ^"GNU" ; then
        # user --user=... --pass=...
else
        # do it the simply way
fi

bye, bastian

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to