Re: [PATCH 1/2] wget: make default timeout configurable, remove a duplicate line
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? -- Harald ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox
Re: [PATCH 1/2] wget: make default timeout configurable, remove a duplicate line
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 ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox
Re: [PATCH 1/2] wget: make default timeout configurable, remove a duplicate line
On Fri, Oct 18, 2013, at 12:52, Tito wrote: Hi, can the wget scripts not be modified like [ -r /etc/default/wget.conf ] . /etc/default/wget.conf wget -t $WGET_TIMEOUT Hi Tito, The whole point of this patch was to avoid having to modify scripts, otherwise we'd just have added the lot of -T options. - Lauri -- http://www.fastmail.fm - Faster than the air-speed velocity of an unladen european swallow ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox
Re: [PATCH 1/2] wget: make default timeout configurable, remove a duplicate line
On Friday 18 October 2013 17:56:57 you wrote: On Fri, Oct 18, 2013, at 12:52, Tito wrote: Hi, can the wget scripts not be modified like [ -r /etc/default/wget.conf ] . /etc/default/wget.conf wget -t $WGET_TIMEOUT Hi Tito, The whole point of this patch was to avoid having to modify scripts, otherwise we'd just have added the lot of -T options. - Lauri Hi, one more solution without the need to modify scripts is to create a wrapper to wget: #!/bin/sh busybox wget -T xxx $@ name it wget and remove the wget link to busybox. Ciao, Tito ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox
Looking for VPN and networking assistance
My apologies if this is not the right forum to ask this question Please point me to a better place. I'm struggling to work out what I have forgotten here. I basically have a piece of ethernet between two buildings. Each building has a WRT54G with openwrt at each end running busybox 1.15.3. The ethernet is connected to a bridge call br-cable (192.168.40.0/24) which also includes the wireless interfaces on the WRT54G. Furthermore, each wrt54g has three additional network ports br-lan (192.168.140.0/24), br-phone (192.168.150.0/24) and br-cam (192.168.20.0/24). They each have an IP on those networks and they can be pinged as expected locally. In order to span those networks across the two buildings, I have created three openvpn servers on one of the routers and three openvpn clients on the other. Those vpns connect as expected. They are running across tap0, tap1 and tap2. Those tap devices are part of the bridges: bridge name bridge id STP enabled interfaces br-lan 8000.001217c6dc1f yes eth0.0 tap0 br-wan 8000.001217c6dc1f yes eth0.1 br-cable8000.001217c6dc1f yes eth0.4 wl0 br-camera 8000.001217c6dc1f yes eth0.3 tap2 br-phone8000.001217c6dc1f yes eth0.2 tap1 (Note: br-wan is not used) I would now expect to be able to ping from a device on say the lan network 192.168.140.0/24 in one building to another device on the lan network in the other building. Alas, this is not the case. What am I missing? Any pointers greatly appreciated. (Oh, the tap interfaces are in promiscuous mode) Thanks. Eric smime.p7s Description: S/MIME Cryptographic Signature ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox
Re: [PATCH 1/2] wget: make default timeout configurable, remove a duplicate line
Hi Tito ! IMO you got the best solution, ... one more solution without the need to modify scripts is to create a wrapper to wget: #!/bin/sh busybox wget -T xxx $@ ... except, I would do an exec here: #!/bin/sh exec busybox wget -T xxx $@ -- Harald ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox
Re: [PATCH 1/2] wget: make default timeout configurable, remove a duplicate line
On Friday 18 October 2013 23:21:41 Harald Becker wrote: Hi Tito ! IMO you got the best solution, ... one more solution without the need to modify scripts is to create a wrapper to wget: #!/bin/sh busybox wget -T xxx $@ ... except, I would do an exec here: #!/bin/sh exec busybox wget -T xxx $@ -- Harald Hi, Why? works for me. ./wget http://busybox.net/downloads/busybox-1.21.1.tar.bz2 Connecting to busybox.net (140.211.167.224:80) busybox-1.21.1.tar.b 100% |**| 2150k 0:00:00 ETA BTW, this could be even improved to source a global wgetrc file. Ciao, Tito ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox
Re: [PATCH 1/2] wget: make default timeout configurable, remove a duplicate line
Hi Tito ! exec Busybox wget ... Why? works for me. Works, yes, but needs additional process (and memory resources) for the extra shell (except on some bash versions, tending to optimize the last command). The exec replaces the shell in memory with the wget, this avoids forking and release memory early, otherwise occupied by the shell (until wget exits) -- Harald ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox