wget: Remove -t from calls

Submitted by Adrian Schmutzler on Jan. 27, 2019, 2:47 p.m.

Details

Message ID 20190127144707.21756-1-freifunk@adrianschmutzler.de
State Accepted
Headers show

Commit Message

Adrian Schmutzler Jan. 27, 2019, 2:47 p.m.
The wget from busybox we are using ignores the -t option,
although it does not throw errors in the currently used version.

However, specifying the -t option in calls where it is not used
is misleading, so it should be removed.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
---
 .../fff/fff-hoods/files/usr/lib/functions/fff/hoodfile         | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/packages/fff/fff-hoods/files/usr/lib/functions/fff/hoodfile b/src/packages/fff/fff-hoods/files/usr/lib/functions/fff/hoodfile
index 89af84c8..d4a9ecb2 100644
--- a/src/packages/fff/fff-hoods/files/usr/lib/functions/fff/hoodfile
+++ b/src/packages/fff/fff-hoods/files/usr/lib/functions/fff/hoodfile
@@ -44,9 +44,9 @@  getWirelessHoodfile() {
 	# wait a moment to start the interface
 	sleep 10;
 
-	if wget -T15 -t5 -O "$file" "http://[fe80::1%w2sta]:2342/keyxchangev2data"; then
+	if wget -T15 -O "$file" "http://[fe80::1%w2sta]:2342/keyxchangev2data"; then
 		return 0
-	elif wget -T15 -t5 -O "$file" "http://[fe80::1%w5sta]:2342/keyxchangev2data"; then
+	elif wget -T15 -O "$file" "http://[fe80::1%w5sta]:2342/keyxchangev2data"; then
 		return 0
 	else
 		return 1
@@ -70,7 +70,7 @@  getEthernetHoodfile() {
 	neighbor_addrs=$(ping6 -c2 ff02::1%"${ethmesh_dev}" | grep seq | grep DUP | cut -d " " -f4 | sed s/:$//g | sort -u)
 
 	for addr in $neighbor_addrs; do
-		wget -T2 -t1 -qO "$file" "http://[${addr}%${ethmesh_dev}]:2342/keyxchangev2data" && return 0
+		wget -T2 -qO "$file" "http://[${addr}%${ethmesh_dev}]:2342/keyxchangev2data" && return 0
 	done
 
 	# got no hoodfile
@@ -86,7 +86,7 @@  getGatewayHoodfile() {
 
 	echo "Trying to get hoodfile from gateway..."
 
-	if wget -T15 -t5 -O "$file" "http://[fe80::1%br-mesh]:2342/keyxchangev2data"; then
+	if wget -T15 -O "$file" "http://[fe80::1%br-mesh]:2342/keyxchangev2data"; then
 		return 0
 	else
 		return 1
@@ -108,7 +108,7 @@  getKeyserverHoodfile() {
 
 	echo "Getting hoodfile from Keyserver"
 
-	if wget -T15 -t5 -O "$file" "http://keyserver.freifunk-franken.de/v2/?lat=$lat&long=$long"; then
+	if wget -T15 -O "$file" "http://keyserver.freifunk-franken.de/v2/?lat=$lat&long=$long"; then
 		return 0
 	else
 		return 1

Comments

Christian Dresel Jan. 27, 2019, 2:51 p.m.
Hallo Adrian

ich hab gerade nur mal schnell auf der GW Firmware geguckt (nicht
getestet) und da scheint es auch kein -T zu geben:

root@fff-gw-cdhome:~# wget --help
BusyBox v1.28.3 () multi-call binary.

Usage: wget [-cq] [-O FILE] [-Y on/off] [-P DIR] [-S] [-U AGENT] URL...

Retrieve files via HTTP or FTP

    -c        Continue retrieval of aborted transfer
    -q        Quiet
    -P DIR        Save to DIR (default .)
    -S            Show server response
    -O FILE        Save to FILE ('-' for stdout)
    -U STR        Use STR for User-Agent header
    -Y on/off    Use proxy

Wenn du das bestätigen kannst und wir eh aufräumen sollten wir den
Parameter vllt. gleich mit verwerfen auch wenn er (aktuell noch) keine
Probleme macht?

Gruß

Christian

On 27.01.19 15:47, Adrian Schmutzler wrote:
> The wget from busybox we are using ignores the -t option,
> although it does not throw errors in the currently used version.
>
> However, specifying the -t option in calls where it is not used
> is misleading, so it should be removed.
>
> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
> ---
>  .../fff/fff-hoods/files/usr/lib/functions/fff/hoodfile         | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/src/packages/fff/fff-hoods/files/usr/lib/functions/fff/hoodfile b/src/packages/fff/fff-hoods/files/usr/lib/functions/fff/hoodfile
> index 89af84c8..d4a9ecb2 100644
> --- a/src/packages/fff/fff-hoods/files/usr/lib/functions/fff/hoodfile
> +++ b/src/packages/fff/fff-hoods/files/usr/lib/functions/fff/hoodfile
> @@ -44,9 +44,9 @@ getWirelessHoodfile() {
>  	# wait a moment to start the interface
>  	sleep 10;
>  
> -	if wget -T15 -t5 -O "$file" "http://[fe80::1%w2sta]:2342/keyxchangev2data"; then
> +	if wget -T15 -O "$file" "http://[fe80::1%w2sta]:2342/keyxchangev2data"; then
>  		return 0
> -	elif wget -T15 -t5 -O "$file" "http://[fe80::1%w5sta]:2342/keyxchangev2data"; then
> +	elif wget -T15 -O "$file" "http://[fe80::1%w5sta]:2342/keyxchangev2data"; then
>  		return 0
>  	else
>  		return 1
> @@ -70,7 +70,7 @@ getEthernetHoodfile() {
>  	neighbor_addrs=$(ping6 -c2 ff02::1%"${ethmesh_dev}" | grep seq | grep DUP | cut -d " " -f4 | sed s/:$//g | sort -u)
>  
>  	for addr in $neighbor_addrs; do
> -		wget -T2 -t1 -qO "$file" "http://[${addr}%${ethmesh_dev}]:2342/keyxchangev2data" && return 0
> +		wget -T2 -qO "$file" "http://[${addr}%${ethmesh_dev}]:2342/keyxchangev2data" && return 0
>  	done
>  
>  	# got no hoodfile
> @@ -86,7 +86,7 @@ getGatewayHoodfile() {
>  
>  	echo "Trying to get hoodfile from gateway..."
>  
> -	if wget -T15 -t5 -O "$file" "http://[fe80::1%br-mesh]:2342/keyxchangev2data"; then
> +	if wget -T15 -O "$file" "http://[fe80::1%br-mesh]:2342/keyxchangev2data"; then
>  		return 0
>  	else
>  		return 1
> @@ -108,7 +108,7 @@ getKeyserverHoodfile() {
>  
>  	echo "Getting hoodfile from Keyserver"
>  
> -	if wget -T15 -t5 -O "$file" "http://keyserver.freifunk-franken.de/v2/?lat=$lat&long=$long"; then
> +	if wget -T15 -O "$file" "http://keyserver.freifunk-franken.de/v2/?lat=$lat&long=$long"; then
>  		return 0
>  	else
>  		return 1
Adrian Schmutzler Jan. 27, 2019, 2:54 p.m.
Hallo,

bei mir steht es da. Mein OpenWrt ist aber ein bisschen neuer.

root@FF-BTL-Bodytalk-Fichtelberg:~# wget
BusyBox v1.28.3 () multi-call binary.

Usage: wget [-cq] [-O FILE] [-Y on/off] [-P DIR] [-S] [-U AGENT] [-T SEC] URL...

Retrieve files via HTTP or FTP

        -c              Continue retrieval of aborted transfer
        -q              Quiet
        -P DIR          Save to DIR (default .)
        -S              Show server response
        -T SEC          Network read timeout is SEC seconds
        -O FILE         Save to FILE ('-' for stdout)
        -U STR          Use STR for User-Agent header
        -Y on/off       Use proxy

Interessanterweise sogar die gleiche Busybox-Version, also war das wohl ein Bug.

Grüße

Adrian

> -----Original Message-----
> From: franken-dev [mailto:franken-dev-bounces@freifunk.net] On Behalf
> Of Christian Dresel
> Sent: Sonntag, 27. Januar 2019 15:52
> To: Adrian Schmutzler <freifunk@adrianschmutzler.de>; franken-
> dev@freifunk.net
> Subject: Re: [PATCH] wget: Remove -t from calls
> 
> Hallo Adrian
> 
> ich hab gerade nur mal schnell auf der GW Firmware geguckt (nicht
> getestet) und da scheint es auch kein -T zu geben:
> 
> root@fff-gw-cdhome:~# wget --help
> BusyBox v1.28.3 () multi-call binary.
> 
> Usage: wget [-cq] [-O FILE] [-Y on/off] [-P DIR] [-S] [-U AGENT] URL...
> 
> Retrieve files via HTTP or FTP
> 
>     -c        Continue retrieval of aborted transfer
>     -q        Quiet
>     -P DIR        Save to DIR (default .)
>     -S            Show server response
>     -O FILE        Save to FILE ('-' for stdout)
>     -U STR        Use STR for User-Agent header
>     -Y on/off    Use proxy
> 
> Wenn du das bestätigen kannst und wir eh aufräumen sollten wir den
> Parameter vllt. gleich mit verwerfen auch wenn er (aktuell noch) keine
> Probleme macht?
> 
> Gruß
> 
> Christian
> 
> On 27.01.19 15:47, Adrian Schmutzler wrote:
> > The wget from busybox we are using ignores the -t option, although it
> > does not throw errors in the currently used version.
> >
> > However, specifying the -t option in calls where it is not used is
> > misleading, so it should be removed.
> >
> > Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
> > ---
> >  .../fff/fff-hoods/files/usr/lib/functions/fff/hoodfile         | 10 +++++-----
> >  1 file changed, 5 insertions(+), 5 deletions(-)
> >
> > diff --git
> > a/src/packages/fff/fff-hoods/files/usr/lib/functions/fff/hoodfile
> > b/src/packages/fff/fff-hoods/files/usr/lib/functions/fff/hoodfile
> > index 89af84c8..d4a9ecb2 100644
> > --- a/src/packages/fff/fff-hoods/files/usr/lib/functions/fff/hoodfile
> > +++ b/src/packages/fff/fff-hoods/files/usr/lib/functions/fff/hoodfile
> > @@ -44,9 +44,9 @@ getWirelessHoodfile() {
> >  	# wait a moment to start the interface
> >  	sleep 10;
> >
> > -	if wget -T15 -t5 -O "$file"
> "http://[fe80::1%w2sta]:2342/keyxchangev2data"; then
> > +	if wget -T15 -O "$file"
> > +"http://[fe80::1%w2sta]:2342/keyxchangev2data"; then
> >  		return 0
> > -	elif wget -T15 -t5 -O "$file"
> "http://[fe80::1%w5sta]:2342/keyxchangev2data"; then
> > +	elif wget -T15 -O "$file"
> > +"http://[fe80::1%w5sta]:2342/keyxchangev2data"; then
> >  		return 0
> >  	else
> >  		return 1
> > @@ -70,7 +70,7 @@ getEthernetHoodfile() {
> >  	neighbor_addrs=$(ping6 -c2 ff02::1%"${ethmesh_dev}" | grep seq |
> > grep DUP | cut -d " " -f4 | sed s/:$//g | sort -u)
> >
> >  	for addr in $neighbor_addrs; do
> > -		wget -T2 -t1 -qO "$file"
> "http://[${addr}%${ethmesh_dev}]:2342/keyxchangev2data" && return 0
> > +		wget -T2 -qO "$file"
> > +"http://[${addr}%${ethmesh_dev}]:2342/keyxchangev2data" && return 0
> >  	done
> >
> >  	# got no hoodfile
> > @@ -86,7 +86,7 @@ getGatewayHoodfile() {
> >
> >  	echo "Trying to get hoodfile from gateway..."
> >
> > -	if wget -T15 -t5 -O "$file" "http://[fe80::1%br-
> mesh]:2342/keyxchangev2data"; then
> > +	if wget -T15 -O "$file"
> > +"http://[fe80::1%br-mesh]:2342/keyxchangev2data"; then
> >  		return 0
> >  	else
> >  		return 1
> > @@ -108,7 +108,7 @@ getKeyserverHoodfile() {
> >
> >  	echo "Getting hoodfile from Keyserver"
> >
> > -	if wget -T15 -t5 -O "$file" "http://keyserver.freifunk-
> franken.de/v2/?lat=$lat&long=$long"; then
> > +	if wget -T15 -O "$file"
> > +"http://keyserver.freifunk-franken.de/v2/?lat=$lat&long=$long"; then
> >  		return 0
> >  	else
> >  		return 1
Christian Dresel Jan. 27, 2019, 2:59 p.m.
hi

On 27.01.19 15:54, mail@adrianschmutzler.de wrote:
> Hallo,
>
> bei mir steht es da. Mein OpenWrt ist aber ein bisschen neuer.

japp ist neuer, und da wir ja eh irgendwann hoch wollen, macht es dann
natürlich auch Sinn es dann doch zu behalten von daher:

Reviewed-by: Christian Dresel <fff@chrisi01.de>

Mir ist jetzt eben noch bei einer Zeile ein -q0 und T2 (statt T15)
aufgefallen, vielleicht sollte man sich da auch nochmal überlegen ob man
das einheitlich macht, aber das kann man später in nen Patch nachschieben.

Gruß

Christian

>
> root@FF-BTL-Bodytalk-Fichtelberg:~# wget
> BusyBox v1.28.3 () multi-call binary.
>
> Usage: wget [-cq] [-O FILE] [-Y on/off] [-P DIR] [-S] [-U AGENT] [-T SEC] URL...
>
> Retrieve files via HTTP or FTP
>
>         -c              Continue retrieval of aborted transfer
>         -q              Quiet
>         -P DIR          Save to DIR (default .)
>         -S              Show server response
>         -T SEC          Network read timeout is SEC seconds
>         -O FILE         Save to FILE ('-' for stdout)
>         -U STR          Use STR for User-Agent header
>         -Y on/off       Use proxy
>
> Interessanterweise sogar die gleiche Busybox-Version, also war das wohl ein Bug.
>
> Grüße
>
> Adrian
>
>> -----Original Message-----
>> From: franken-dev [mailto:franken-dev-bounces@freifunk.net] On Behalf
>> Of Christian Dresel
>> Sent: Sonntag, 27. Januar 2019 15:52
>> To: Adrian Schmutzler <freifunk@adrianschmutzler.de>; franken-
>> dev@freifunk.net
>> Subject: Re: [PATCH] wget: Remove -t from calls
>>
>> Hallo Adrian
>>
>> ich hab gerade nur mal schnell auf der GW Firmware geguckt (nicht
>> getestet) und da scheint es auch kein -T zu geben:
>>
>> root@fff-gw-cdhome:~# wget --help
>> BusyBox v1.28.3 () multi-call binary.
>>
>> Usage: wget [-cq] [-O FILE] [-Y on/off] [-P DIR] [-S] [-U AGENT] URL...
>>
>> Retrieve files via HTTP or FTP
>>
>>     -c        Continue retrieval of aborted transfer
>>     -q        Quiet
>>     -P DIR        Save to DIR (default .)
>>     -S            Show server response
>>     -O FILE        Save to FILE ('-' for stdout)
>>     -U STR        Use STR for User-Agent header
>>     -Y on/off    Use proxy
>>
>> Wenn du das bestätigen kannst und wir eh aufräumen sollten wir den
>> Parameter vllt. gleich mit verwerfen auch wenn er (aktuell noch) keine
>> Probleme macht?
>>
>> Gruß
>>
>> Christian
>>
>> On 27.01.19 15:47, Adrian Schmutzler wrote:
>>> The wget from busybox we are using ignores the -t option, although it
>>> does not throw errors in the currently used version.
>>>
>>> However, specifying the -t option in calls where it is not used is
>>> misleading, so it should be removed.
>>>
>>> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
>>> ---
>>>  .../fff/fff-hoods/files/usr/lib/functions/fff/hoodfile         | 10 +++++-----
>>>  1 file changed, 5 insertions(+), 5 deletions(-)
>>>
>>> diff --git
>>> a/src/packages/fff/fff-hoods/files/usr/lib/functions/fff/hoodfile
>>> b/src/packages/fff/fff-hoods/files/usr/lib/functions/fff/hoodfile
>>> index 89af84c8..d4a9ecb2 100644
>>> --- a/src/packages/fff/fff-hoods/files/usr/lib/functions/fff/hoodfile
>>> +++ b/src/packages/fff/fff-hoods/files/usr/lib/functions/fff/hoodfile
>>> @@ -44,9 +44,9 @@ getWirelessHoodfile() {
>>>  	# wait a moment to start the interface
>>>  	sleep 10;
>>>
>>> -	if wget -T15 -t5 -O "$file"
>> "http://[fe80::1%w2sta]:2342/keyxchangev2data"; then
>>> +	if wget -T15 -O "$file"
>>> +"http://[fe80::1%w2sta]:2342/keyxchangev2data"; then
>>>  		return 0
>>> -	elif wget -T15 -t5 -O "$file"
>> "http://[fe80::1%w5sta]:2342/keyxchangev2data"; then
>>> +	elif wget -T15 -O "$file"
>>> +"http://[fe80::1%w5sta]:2342/keyxchangev2data"; then
>>>  		return 0
>>>  	else
>>>  		return 1
>>> @@ -70,7 +70,7 @@ getEthernetHoodfile() {
>>>  	neighbor_addrs=$(ping6 -c2 ff02::1%"${ethmesh_dev}" | grep seq |
>>> grep DUP | cut -d " " -f4 | sed s/:$//g | sort -u)
>>>
>>>  	for addr in $neighbor_addrs; do
>>> -		wget -T2 -t1 -qO "$file"
>> "http://[${addr}%${ethmesh_dev}]:2342/keyxchangev2data" && return 0
>>> +		wget -T2 -qO "$file"
>>> +"http://[${addr}%${ethmesh_dev}]:2342/keyxchangev2data" && return 0
>>>  	done
>>>
>>>  	# got no hoodfile
>>> @@ -86,7 +86,7 @@ getGatewayHoodfile() {
>>>
>>>  	echo "Trying to get hoodfile from gateway..."
>>>
>>> -	if wget -T15 -t5 -O "$file" "http://[fe80::1%br-
>> mesh]:2342/keyxchangev2data"; then
>>> +	if wget -T15 -O "$file"
>>> +"http://[fe80::1%br-mesh]:2342/keyxchangev2data"; then
>>>  		return 0
>>>  	else
>>>  		return 1
>>> @@ -108,7 +108,7 @@ getKeyserverHoodfile() {
>>>
>>>  	echo "Getting hoodfile from Keyserver"
>>>
>>> -	if wget -T15 -t5 -O "$file" "http://keyserver.freifunk-
>> franken.de/v2/?lat=$lat&long=$long"; then
>>> +	if wget -T15 -O "$file"
>>> +"http://keyserver.freifunk-franken.de/v2/?lat=$lat&long=$long"; then
>>>  		return 0
>>>  	else
>>>  		return 1
Adrian Schmutzler Jan. 27, 2019, 3:46 p.m.
Hallo Christian,

danke für den Review.

Das T2 steht beim Download über Netzwerk. Das wollten wir bewusst kein langes Delay, weil Netzwerk ja schnell gehen sollte (ich habe damals glaube ich die gleiche Frage gestellt wie du jetzt).

Grüße

Adrian

> -----Original Message-----
> From: Christian Dresel [mailto:fff@chrisi01.de]
> Sent: Sonntag, 27. Januar 2019 16:00
> To: mail@adrianschmutzler.de; franken-dev@freifunk.net
> Subject: Re: [PATCH] wget: Remove -t from calls
> 
> hi
> 
> On 27.01.19 15:54, mail@adrianschmutzler.de wrote:
> > Hallo,
> >
> > bei mir steht es da. Mein OpenWrt ist aber ein bisschen neuer.
> 
> japp ist neuer, und da wir ja eh irgendwann hoch wollen, macht es dann
> natürlich auch Sinn es dann doch zu behalten von daher:
> 
> Reviewed-by: Christian Dresel <fff@chrisi01.de>
> 
> Mir ist jetzt eben noch bei einer Zeile ein -q0 und T2 (statt T15) aufgefallen,
> vielleicht sollte man sich da auch nochmal überlegen ob man das einheitlich
> macht, aber das kann man später in nen Patch nachschieben.
> 
> Gruß
> 
> Christian
> 
> >
> > root@FF-BTL-Bodytalk-Fichtelberg:~# wget BusyBox v1.28.3 () multi-call
> > binary.
> >
> > Usage: wget [-cq] [-O FILE] [-Y on/off] [-P DIR] [-S] [-U AGENT] [-T SEC]
> URL...
> >
> > Retrieve files via HTTP or FTP
> >
> >         -c              Continue retrieval of aborted transfer
> >         -q              Quiet
> >         -P DIR          Save to DIR (default .)
> >         -S              Show server response
> >         -T SEC          Network read timeout is SEC seconds
> >         -O FILE         Save to FILE ('-' for stdout)
> >         -U STR          Use STR for User-Agent header
> >         -Y on/off       Use proxy
> >
> > Interessanterweise sogar die gleiche Busybox-Version, also war das wohl
> ein Bug.
> >
> > Grüße
> >
> > Adrian
> >
> >> -----Original Message-----
> >> From: franken-dev [mailto:franken-dev-bounces@freifunk.net] On
> Behalf
> >> Of Christian Dresel
> >> Sent: Sonntag, 27. Januar 2019 15:52
> >> To: Adrian Schmutzler <freifunk@adrianschmutzler.de>; franken-
> >> dev@freifunk.net
> >> Subject: Re: [PATCH] wget: Remove -t from calls
> >>
> >> Hallo Adrian
> >>
> >> ich hab gerade nur mal schnell auf der GW Firmware geguckt (nicht
> >> getestet) und da scheint es auch kein -T zu geben:
> >>
> >> root@fff-gw-cdhome:~# wget --help
> >> BusyBox v1.28.3 () multi-call binary.
> >>
> >> Usage: wget [-cq] [-O FILE] [-Y on/off] [-P DIR] [-S] [-U AGENT] URL...
> >>
> >> Retrieve files via HTTP or FTP
> >>
> >>     -c        Continue retrieval of aborted transfer
> >>     -q        Quiet
> >>     -P DIR        Save to DIR (default .)
> >>     -S            Show server response
> >>     -O FILE        Save to FILE ('-' for stdout)
> >>     -U STR        Use STR for User-Agent header
> >>     -Y on/off    Use proxy
> >>
> >> Wenn du das bestätigen kannst und wir eh aufräumen sollten wir den
> >> Parameter vllt. gleich mit verwerfen auch wenn er (aktuell noch)
> >> keine Probleme macht?
> >>
> >> Gruß
> >>
> >> Christian
> >>
> >> On 27.01.19 15:47, Adrian Schmutzler wrote:
> >>> The wget from busybox we are using ignores the -t option, although
> >>> it does not throw errors in the currently used version.
> >>>
> >>> However, specifying the -t option in calls where it is not used is
> >>> misleading, so it should be removed.
> >>>
> >>> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
> >>> ---
> >>>  .../fff/fff-hoods/files/usr/lib/functions/fff/hoodfile         | 10 +++++-----
> >>>  1 file changed, 5 insertions(+), 5 deletions(-)
> >>>
> >>> diff --git
> >>> a/src/packages/fff/fff-hoods/files/usr/lib/functions/fff/hoodfile
> >>> b/src/packages/fff/fff-hoods/files/usr/lib/functions/fff/hoodfile
> >>> index 89af84c8..d4a9ecb2 100644
> >>> ---
> >>> a/src/packages/fff/fff-hoods/files/usr/lib/functions/fff/hoodfile
> >>> +++ b/src/packages/fff/fff-hoods/files/usr/lib/functions/fff/hoodfil
> >>> +++ e
> >>> @@ -44,9 +44,9 @@ getWirelessHoodfile() {
> >>>  	# wait a moment to start the interface
> >>>  	sleep 10;
> >>>
> >>> -	if wget -T15 -t5 -O "$file"
> >> "http://[fe80::1%w2sta]:2342/keyxchangev2data"; then
> >>> +	if wget -T15 -O "$file"
> >>> +"http://[fe80::1%w2sta]:2342/keyxchangev2data"; then
> >>>  		return 0
> >>> -	elif wget -T15 -t5 -O "$file"
> >> "http://[fe80::1%w5sta]:2342/keyxchangev2data"; then
> >>> +	elif wget -T15 -O "$file"
> >>> +"http://[fe80::1%w5sta]:2342/keyxchangev2data"; then
> >>>  		return 0
> >>>  	else
> >>>  		return 1
> >>> @@ -70,7 +70,7 @@ getEthernetHoodfile() {
> >>>  	neighbor_addrs=$(ping6 -c2 ff02::1%"${ethmesh_dev}" | grep seq |
> >>> grep DUP | cut -d " " -f4 | sed s/:$//g | sort -u)
> >>>
> >>>  	for addr in $neighbor_addrs; do
> >>> -		wget -T2 -t1 -qO "$file"
> >> "http://[${addr}%${ethmesh_dev}]:2342/keyxchangev2data" && return 0
> >>> +		wget -T2 -qO "$file"
> >>> +"http://[${addr}%${ethmesh_dev}]:2342/keyxchangev2data" &&
> return 0
> >>>  	done
> >>>
> >>>  	# got no hoodfile
> >>> @@ -86,7 +86,7 @@ getGatewayHoodfile() {
> >>>
> >>>  	echo "Trying to get hoodfile from gateway..."
> >>>
> >>> -	if wget -T15 -t5 -O "$file" "http://[fe80::1%br-
> >> mesh]:2342/keyxchangev2data"; then
> >>> +	if wget -T15 -O "$file"
> >>> +"http://[fe80::1%br-mesh]:2342/keyxchangev2data"; then
> >>>  		return 0
> >>>  	else
> >>>  		return 1
> >>> @@ -108,7 +108,7 @@ getKeyserverHoodfile() {
> >>>
> >>>  	echo "Getting hoodfile from Keyserver"
> >>>
> >>> -	if wget -T15 -t5 -O "$file" "http://keyserver.freifunk-
> >> franken.de/v2/?lat=$lat&long=$long"; then
> >>> +	if wget -T15 -O "$file"
> >>> +"http://keyserver.freifunk-franken.de/v2/?lat=$lat&long=$long";
> >>> +then
> >>>  		return 0
> >>>  	else
> >>>  		return 1
Robert Langhammer Jan. 27, 2019, 4:37 p.m.
Hallo,

es ist wirklich sinnvoll eine Option, die ignoriert wird raus zu nehmen!

Reviewed_by: Robert Langhammer <rlanghammer@web.de>

Zum Thema einheitlich:

grep -r wget * | tr -d \\t | sed 's/:/!/' | column -s! -t
fff-hoods/files/usr/lib/functions/fff/hoodfile  if wget -T15 -t5 -O
"$file" "http://[fe80::1%w2sta]:2342/keyxchangev2data"; then
fff-hoods/files/usr/lib/functions/fff/hoodfile  elif wget -T15 -t5 -O
"$file" "http://[fe80::1%w5sta]:2342/keyxchangev2data"; then
fff-hoods/files/usr/lib/functions/fff/hoodfile  wget -T2 -t1 -qO "$file"
"http://[${addr}%${ethmesh_dev}]:2342/keyxchangev2data" && return 0
fff-hoods/files/usr/lib/functions/fff/hoodfile  if wget -T15 -t5 -O
"$file" "http://[fe80::1%br-mesh]:2342/keyxchangev2data"; then
fff-hoods/files/usr/lib/functions/fff/hoodfile  if wget -T15 -t5 -O
"$file" "http://keyserver.freifunk-franken.de/v2/?lat=$lat&long=$long"; then
fff-sysupgrade/files/etc/sysupgrade.sh          wget
"${UPGRADE_PATH}/release.nfo"
fff-sysupgrade/files/etc/sysupgrade.sh          wget
"${UPGRADE_PATH}/${FILE}"
fff-sysupgrade/files/etc/sysupgrade.sh          wget
"${UPGRADE_PATH}/${FILE}.sha256"
fff-vpn-select/files/usr/sbin/vpn-select        if [ "l2tp" = "$(wget
-T10 "${address}/vpn.txt" -O - 2>/dev/null)" ]; then
fff-web/files/www/ssl/cgi-bin/header            /usr/bin/wget
"${UPGRADE_PATH}/release.nfo" -P /tmp -T 2

Wir haben manchmal -q mit drin auch mal ein -P, -T ist auch
unterschiedlich. Ich denke, das kommt immer darauf an, was gemacht wird.
sysupgrade hat auch kein T, würde hängen bleiben. Das kann man nicht
pauschal sagen.

Robert

Am 27.01.19 um 16:46 schrieb mail@adrianschmutzler.de:
> Hallo Christian,
>
> danke für den Review.
>
> Das T2 steht beim Download über Netzwerk. Das wollten wir bewusst kein langes Delay, weil Netzwerk ja schnell gehen sollte (ich habe damals glaube ich die gleiche Frage gestellt wie du jetzt).
>
> Grüße
>
> Adrian
>
>> -----Original Message-----
>> From: Christian Dresel [mailto:fff@chrisi01.de]
>> Sent: Sonntag, 27. Januar 2019 16:00
>> To: mail@adrianschmutzler.de; franken-dev@freifunk.net
>> Subject: Re: [PATCH] wget: Remove -t from calls
>>
>> hi
>>
>> On 27.01.19 15:54, mail@adrianschmutzler.de wrote:
>>> Hallo,
>>>
>>> bei mir steht es da. Mein OpenWrt ist aber ein bisschen neuer.
>> japp ist neuer, und da wir ja eh irgendwann hoch wollen, macht es dann
>> natürlich auch Sinn es dann doch zu behalten von daher:
>>
>> Reviewed-by: Christian Dresel <fff@chrisi01.de>
>>
>> Mir ist jetzt eben noch bei einer Zeile ein -q0 und T2 (statt T15) aufgefallen,
>> vielleicht sollte man sich da auch nochmal überlegen ob man das einheitlich
>> macht, aber das kann man später in nen Patch nachschieben.
>>
>> Gruß
>>
>> Christian
>>
>>> root@FF-BTL-Bodytalk-Fichtelberg:~# wget BusyBox v1.28.3 () multi-call
>>> binary.
>>>
>>> Usage: wget [-cq] [-O FILE] [-Y on/off] [-P DIR] [-S] [-U AGENT] [-T SEC]
>> URL...
>>> Retrieve files via HTTP or FTP
>>>
>>>         -c              Continue retrieval of aborted transfer
>>>         -q              Quiet
>>>         -P DIR          Save to DIR (default .)
>>>         -S              Show server response
>>>         -T SEC          Network read timeout is SEC seconds
>>>         -O FILE         Save to FILE ('-' for stdout)
>>>         -U STR          Use STR for User-Agent header
>>>         -Y on/off       Use proxy
>>>
>>> Interessanterweise sogar die gleiche Busybox-Version, also war das wohl
>> ein Bug.
>>> Grüße
>>>
>>> Adrian
>>>
>>>> -----Original Message-----
>>>> From: franken-dev [mailto:franken-dev-bounces@freifunk.net] On
>> Behalf
>>>> Of Christian Dresel
>>>> Sent: Sonntag, 27. Januar 2019 15:52
>>>> To: Adrian Schmutzler <freifunk@adrianschmutzler.de>; franken-
>>>> dev@freifunk.net
>>>> Subject: Re: [PATCH] wget: Remove -t from calls
>>>>
>>>> Hallo Adrian
>>>>
>>>> ich hab gerade nur mal schnell auf der GW Firmware geguckt (nicht
>>>> getestet) und da scheint es auch kein -T zu geben:
>>>>
>>>> root@fff-gw-cdhome:~# wget --help
>>>> BusyBox v1.28.3 () multi-call binary.
>>>>
>>>> Usage: wget [-cq] [-O FILE] [-Y on/off] [-P DIR] [-S] [-U AGENT] URL...
>>>>
>>>> Retrieve files via HTTP or FTP
>>>>
>>>>     -c        Continue retrieval of aborted transfer
>>>>     -q        Quiet
>>>>     -P DIR        Save to DIR (default .)
>>>>     -S            Show server response
>>>>     -O FILE        Save to FILE ('-' for stdout)
>>>>     -U STR        Use STR for User-Agent header
>>>>     -Y on/off    Use proxy
>>>>
>>>> Wenn du das bestätigen kannst und wir eh aufräumen sollten wir den
>>>> Parameter vllt. gleich mit verwerfen auch wenn er (aktuell noch)
>>>> keine Probleme macht?
>>>>
>>>> Gruß
>>>>
>>>> Christian
>>>>
>>>> On 27.01.19 15:47, Adrian Schmutzler wrote:
>>>>> The wget from busybox we are using ignores the -t option, although
>>>>> it does not throw errors in the currently used version.
>>>>>
>>>>> However, specifying the -t option in calls where it is not used is
>>>>> misleading, so it should be removed.
>>>>>
>>>>> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
>>>>> ---
>>>>>  .../fff/fff-hoods/files/usr/lib/functions/fff/hoodfile         | 10 +++++-----
>>>>>  1 file changed, 5 insertions(+), 5 deletions(-)
>>>>>
>>>>> diff --git
>>>>> a/src/packages/fff/fff-hoods/files/usr/lib/functions/fff/hoodfile
>>>>> b/src/packages/fff/fff-hoods/files/usr/lib/functions/fff/hoodfile
>>>>> index 89af84c8..d4a9ecb2 100644
>>>>> ---
>>>>> a/src/packages/fff/fff-hoods/files/usr/lib/functions/fff/hoodfile
>>>>> +++ b/src/packages/fff/fff-hoods/files/usr/lib/functions/fff/hoodfil
>>>>> +++ e
>>>>> @@ -44,9 +44,9 @@ getWirelessHoodfile() {
>>>>>  	# wait a moment to start the interface
>>>>>  	sleep 10;
>>>>>
>>>>> -	if wget -T15 -t5 -O "$file"
>>>> "http://[fe80::1%w2sta]:2342/keyxchangev2data"; then
>>>>> +	if wget -T15 -O "$file"
>>>>> +"http://[fe80::1%w2sta]:2342/keyxchangev2data"; then
>>>>>  		return 0
>>>>> -	elif wget -T15 -t5 -O "$file"
>>>> "http://[fe80::1%w5sta]:2342/keyxchangev2data"; then
>>>>> +	elif wget -T15 -O "$file"
>>>>> +"http://[fe80::1%w5sta]:2342/keyxchangev2data"; then
>>>>>  		return 0
>>>>>  	else
>>>>>  		return 1
>>>>> @@ -70,7 +70,7 @@ getEthernetHoodfile() {
>>>>>  	neighbor_addrs=$(ping6 -c2 ff02::1%"${ethmesh_dev}" | grep seq |
>>>>> grep DUP | cut -d " " -f4 | sed s/:$//g | sort -u)
>>>>>
>>>>>  	for addr in $neighbor_addrs; do
>>>>> -		wget -T2 -t1 -qO "$file"
>>>> "http://[${addr}%${ethmesh_dev}]:2342/keyxchangev2data" && return 0
>>>>> +		wget -T2 -qO "$file"
>>>>> +"http://[${addr}%${ethmesh_dev}]:2342/keyxchangev2data" &&
>> return 0
>>>>>  	done
>>>>>
>>>>>  	# got no hoodfile
>>>>> @@ -86,7 +86,7 @@ getGatewayHoodfile() {
>>>>>
>>>>>  	echo "Trying to get hoodfile from gateway..."
>>>>>
>>>>> -	if wget -T15 -t5 -O "$file" "http://[fe80::1%br-
>>>> mesh]:2342/keyxchangev2data"; then
>>>>> +	if wget -T15 -O "$file"
>>>>> +"http://[fe80::1%br-mesh]:2342/keyxchangev2data"; then
>>>>>  		return 0
>>>>>  	else
>>>>>  		return 1
>>>>> @@ -108,7 +108,7 @@ getKeyserverHoodfile() {
>>>>>
>>>>>  	echo "Getting hoodfile from Keyserver"
>>>>>
>>>>> -	if wget -T15 -t5 -O "$file" "http://keyserver.freifunk-
>>>> franken.de/v2/?lat=$lat&long=$long"; then
>>>>> +	if wget -T15 -O "$file"
>>>>> +"http://keyserver.freifunk-franken.de/v2/?lat=$lat&long=$long";
>>>>> +then
>>>>>  		return 0
>>>>>  	else
>>>>>  		return 1
Adrian Schmutzler Jan. 29, 2019, 12:02 a.m.
Applied.

 

From: franken-dev [mailto:franken-dev-bounces@freifunk.net] On Behalf Of mail@adrianschmutzler.de
Sent: Sonntag, 27. Januar 2019 16:46
To: fff@chrisi01.de; franken-dev@freifunk.net
Subject: RE: [PATCH] wget: Remove -t from calls

 

Hallo Christian, 

danke für den Review. 

Das T2 steht beim Download über Netzwerk. Das wollten wir bewusst kein langes Delay, weil Netzwerk ja schnell gehen sollte (ich habe damals glaube ich die gleiche Frage gestellt wie du jetzt).

Grüße 

Adrian 

> -----Original Message----- 
> From: Christian Dresel [mailto:fff@chrisi01.de] 
> Sent: Sonntag, 27. Januar 2019 16:00 
> To: mail@adrianschmutzler.de <mailto:mail@adrianschmutzler.de> ; franken-dev@freifunk.net <mailto:franken-dev@freifunk.net>  
> Subject: Re: [PATCH] wget: Remove -t from calls 
> 
> hi 
> 
> On 27.01.19 15:54, mail@adrianschmutzler.de <mailto:mail@adrianschmutzler.de>  wrote: 
> > Hallo, 
> > 
> > bei mir steht es da. Mein OpenWrt ist aber ein bisschen neuer. 
> 
> japp ist neuer, und da wir ja eh irgendwann hoch wollen, macht es dann 
> natürlich auch Sinn es dann doch zu behalten von daher: 
> 
> Reviewed-by: Christian Dresel <fff@chrisi01.de <mailto:fff@chrisi01.de> > 
> 
> Mir ist jetzt eben noch bei einer Zeile ein -q0 und T2 (statt T15) aufgefallen, 
> vielleicht sollte man sich da auch nochmal überlegen ob man das einheitlich 
> macht, aber das kann man später in nen Patch nachschieben. 
> 
> Gruß 
> 
> Christian 
> 
> > 
> > root@FF-BTL-Bodytalk-Fichtelberg:~# wget BusyBox v1.28.3 () multi-call 
> > binary. 
> > 
> > Usage: wget [-cq] [-O FILE] [-Y on/off] [-P DIR] [-S] [-U AGENT] [-T SEC] 
> URL... 
> > 
> > Retrieve files via HTTP or FTP 
> > 
> >         -c              Continue retrieval of aborted transfer 
> >         -q              Quiet 
> >         -P DIR          Save to DIR (default .) 
> >         -S              Show server response 
> >         -T SEC          Network read timeout is SEC seconds 
> >         -O FILE         Save to FILE ('-' for stdout) 
> >         -U STR          Use STR for User-Agent header 
> >         -Y on/off       Use proxy 
> > 
> > Interessanterweise sogar die gleiche Busybox-Version, also war das wohl 
> ein Bug. 
> > 
> > Grüße 
> > 
> > Adrian 
> > 
> >> -----Original Message----- 
> >> From: franken-dev [mailto:franken-dev-bounces@freifunk.net] On 
> Behalf 
> >> Of Christian Dresel 
> >> Sent: Sonntag, 27. Januar 2019 15:52 
> >> To: Adrian Schmutzler <freifunk@adrianschmutzler.de <mailto:freifunk@adrianschmutzler.de> >; franken- 
> >> dev@freifunk.net <mailto:dev@freifunk.net>  
> >> Subject: Re: [PATCH] wget: Remove -t from calls 
> >> 
> >> Hallo Adrian 
> >> 
> >> ich hab gerade nur mal schnell auf der GW Firmware geguckt (nicht 
> >> getestet) und da scheint es auch kein -T zu geben: 
> >> 
> >> root@fff-gw-cdhome:~# wget --help 
> >> BusyBox v1.28.3 () multi-call binary. 
> >> 
> >> Usage: wget [-cq] [-O FILE] [-Y on/off] [-P DIR] [-S] [-U AGENT] URL... 
> >> 
> >> Retrieve files via HTTP or FTP 
> >> 
> >>     -c        Continue retrieval of aborted transfer 
> >>     -q        Quiet 
> >>     -P DIR        Save to DIR (default .) 
> >>     -S            Show server response 
> >>     -O FILE        Save to FILE ('-' for stdout) 
> >>     -U STR        Use STR for User-Agent header 
> >>     -Y on/off    Use proxy 
> >> 
> >> Wenn du das bestätigen kannst und wir eh aufräumen sollten wir den 
> >> Parameter vllt. gleich mit verwerfen auch wenn er (aktuell noch) 
> >> keine Probleme macht? 
> >> 
> >> Gruß 
> >> 
> >> Christian 
> >> 
> >> On 27.01.19 15:47, Adrian Schmutzler wrote: 
> >>> The wget from busybox we are using ignores the -t option, although 
> >>> it does not throw errors in the currently used version. 
> >>> 
> >>> However, specifying the -t option in calls where it is not used is 
> >>> misleading, so it should be removed. 
> >>> 
> >>> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de <mailto:freifunk@adrianschmutzler.de> > 
> >>> --- 
> >>>  .../fff/fff-hoods/files/usr/lib/functions/fff/hoodfile         | 10 +++++----- 
> >>>  1 file changed, 5 insertions(+), 5 deletions(-) 
> >>> 
> >>> diff --git 
> >>> a/src/packages/fff/fff-hoods/files/usr/lib/functions/fff/hoodfile 
> >>> b/src/packages/fff/fff-hoods/files/usr/lib/functions/fff/hoodfile 
> >>> index 89af84c8..d4a9ecb2 100644 
> >>> --- 
> >>> a/src/packages/fff/fff-hoods/files/usr/lib/functions/fff/hoodfile 
> >>> +++ b/src/packages/fff/fff-hoods/files/usr/lib/functions/fff/hoodfil 
> >>> +++ e 
> >>> @@ -44,9 +44,9 @@ getWirelessHoodfile() { 
> >>>   # wait a moment to start the interface 
> >>>   sleep 10; 
> >>> 
> >>> - if wget -T15 -t5 -O "$file" 
> >> "http://[fe80::1%w2sta]:2342/keyxchangev2data"; then 
> >>> + if wget -T15 -O "$file" 
> >>> +"http://[fe80::1%w2sta]:2342/keyxchangev2data"; then 
> >>>           return 0 
> >>> - elif wget -T15 -t5 -O "$file" 
> >> "http://[fe80::1%w5sta]:2342/keyxchangev2data"; then 
> >>> + elif wget -T15 -O "$file" 
> >>> +"http://[fe80::1%w5sta]:2342/keyxchangev2data"; then 
> >>>           return 0 
> >>>   else 
> >>>           return 1 
> >>> @@ -70,7 +70,7 @@ getEthernetHoodfile() { 
> >>>   neighbor_addrs=$(ping6 -c2 ff02::1%"${ethmesh_dev}" | grep seq | 
> >>> grep DUP | cut -d " " -f4 | sed s/:$//g | sort -u) 
> >>> 
> >>>   for addr in $neighbor_addrs; do 
> >>> -         wget -T2 -t1 -qO "$file" 
> >> "http://[${addr}%${ethmesh_dev}]:2342/keyxchangev2data" && return 0 
> >>> +         wget -T2 -qO "$file" 
> >>> +"http://[${addr}%${ethmesh_dev}]:2342/keyxchangev2data" && 
> return 0 
> >>>   done 
> >>> 
> >>>   # got no hoodfile 
> >>> @@ -86,7 +86,7 @@ getGatewayHoodfile() { 
> >>> 
> >>>   echo "Trying to get hoodfile from gateway..." 
> >>> 
> >>> - if wget -T15 -t5 -O "$file" "http://[fe80::1%br- 
> >> mesh]:2342/keyxchangev2data"; then 
> >>> + if wget -T15 -O "$file" 
> >>> +"http://[fe80::1%br-mesh]:2342/keyxchangev2data"; then 
> >>>           return 0 
> >>>   else 
> >>>           return 1 
> >>> @@ -108,7 +108,7 @@ getKeyserverHoodfile() { 
> >>> 
> >>>   echo "Getting hoodfile from Keyserver" 
> >>> 
> >>> - if wget -T15 -t5 -O "$file" "http://keyserver.freifunk- 
> >> franken.de/v2/?lat=$lat&long=$long"; then 
> >>> + if wget -T15 -O "$file" 
> >>> +"http://keyserver.freifunk-franken.de/v2/?lat=$lat&long=$long"; 
> >>> +then 
> >>>           return 0 
> >>>   else 
> >>>           return 1