* [ptxdist] making HTTP proxy timeout adjustable
@ 2012-09-17 7:19 Schenk, Gavin
2012-09-17 7:48 ` Juergen Beisert
0 siblings, 1 reply; 5+ messages in thread
From: Schenk, Gavin @ 2012-09-17 7:19 UTC (permalink / raw)
To: ptxdist
[-- Attachment #1.1: Type: text/plain, Size: 2405 bytes --]
Hi all,
I recently migrated to 2012-09 and as usual I had to work around our companies HTTP proxy ...
... so what about something like:
diff -Naur orig/ptxdist-2012.09.0/config/setup/Kconfig ptxdist-2012.09.0/config/setup/Kconfig
--- orig/ptxdist-2012.09.0/config/setup/Kconfig 2012-09-06 18:13:48.000000000 +0200
+++ ptxdist-2012.09.0/config/setup/Kconfig 2012-09-17 09:12:02.274401151 +0200
@@ -56,6 +56,14 @@
http://your.proxy.org:80
+config SETUP_HTTP_PROXY_TIMEOUT
+ prompt "HTTP Proxy timeout"
+ int
+ default "30"
+ help
+ Set maximum timeout for downloads via a http proxy
+
+
endmenu
menu "Project Searchpath"
diff -Naur orig/ptxdist-2012.09.0/config/setup/ptxdistrc.default ptxdist-2012.09.0/config/setup/ptxdistrc.default
--- orig/ptxdist-2012.09.0/config/setup/ptxdistrc.default 2012-09-06 18:13:48.000000000 +0200
+++ ptxdist-2012.09.0/config/setup/ptxdistrc.default 2012-09-17 09:11:43.399225416 +0200
@@ -18,7 +18,7 @@
#
PTXCONF_SETUP_FTP_PROXY=""
PTXCONF_SETUP_HTTP_PROXY=""
-
+PTXCONF_SETUP_HTTP_PROXY_TIMEOUT="30"
#
# Project Searchpath
#
diff -Naur orig/ptxdist-2012.09.0/scripts/lib/ptxd_make_get.sh ptxdist-2012.09.0/scripts/lib/ptxd_make_get.sh
--- orig/ptxdist-2012.09.0/scripts/lib/ptxd_make_get.sh 2012-09-06 18:13:48.000000000 +0200
+++ ptxdist-2012.09.0/scripts/lib/ptxd_make_get.sh 2012-09-17 09:03:42.069850814 +0200
@@ -43,6 +43,13 @@
#
local file="${url##*/}"
+ #
+ # Proxy timeout
+ local proxytimeout= ${PTXCONF_SETUP_HTTP_PROXY_TIMEOUT}
+ if [ -z proxytimeout ]; then
+ proxytimeout=30
+ fi
+
# remove any pending or half downloaded files
rm -f -- "${path}."*
@@ -50,7 +57,7 @@
wget \
--passive-ftp \
--progress=bar:force \
- --timeout=30 \
+ --timeout=${proxytimeout} \
--tries=5 \
${PTXDIST_QUIET:+--quiet} \
"${opts[@]}" \
Regards
Gavin
Eckelmann Aktiengesellschaft
Vorstand: Dr.-Ing. Gerd Eckelmann (Vorsitzender)
Dr.-Ing. Peter Cordes, Dr.-Ing. Frank-Thomas Mellert
Vorsitzender des Aufsichtsrats: Hubertus G. Krossa
Sitz der Gesellschaft: Wiesbaden Amtsgericht Wiesbaden HRB 12636
[-- Attachment #1.2: Type: text/html, Size: 13765 bytes --]
[-- Attachment #2: Type: text/plain, Size: 48 bytes --]
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ptxdist] making HTTP proxy timeout adjustable
2012-09-17 7:19 [ptxdist] making HTTP proxy timeout adjustable Schenk, Gavin
@ 2012-09-17 7:48 ` Juergen Beisert
2012-09-17 8:45 ` Schenk, Gavin
2012-09-17 19:18 ` Robert Schwebel
0 siblings, 2 replies; 5+ messages in thread
From: Juergen Beisert @ 2012-09-17 7:48 UTC (permalink / raw)
To: ptxdist; +Cc: Schenk, Gavin
Schenk, Gavin wrote:
> Hi all,
>
> I recently migrated to 2012-09 and as usual I had to work around our
> companies HTTP proxy ... ... so what about something like:
>
> diff -Naur orig/ptxdist-2012.09.0/config/setup/Kconfig
> ptxdist-2012.09.0/config/setup/Kconfig ---
> orig/ptxdist-2012.09.0/config/setup/Kconfig 2012-09-06 18:13:48.000000000
> +0200 +++ ptxdist-2012.09.0/config/setup/Kconfig 2012-09-17
> 09:12:02.274401151 +0200 @@ -56,6 +56,14 @@
> http://your.proxy.org:80
> +config SETUP_HTTP_PROXY_TIMEOUT
> + prompt "HTTP Proxy timeout"
> + int
> + default "30"
> + help
> + Set maximum timeout for downloads via a http proxy
Seconds? Hours? Months? Years?
jbe
--
Pengutronix e.K. | Juergen Beisert |
Linux Solutions for Science and Industry | http://www.pengutronix.de/ |
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ptxdist] making HTTP proxy timeout adjustable
2012-09-17 7:48 ` Juergen Beisert
@ 2012-09-17 8:45 ` Schenk, Gavin
2012-09-17 8:55 ` Juergen Beisert
2012-09-17 19:18 ` Robert Schwebel
1 sibling, 1 reply; 5+ messages in thread
From: Schenk, Gavin @ 2012-09-17 8:45 UTC (permalink / raw)
To: ptxdist
>
> Seconds? Hours? Months? Years?
>
seconds :)
---
diff -Naur orig/ptxdist-2012.09.0/config/setup/Kconfig ptxdist-2012.09.0/config/setup/Kconfig
--- orig/ptxdist-2012.09.0/config/setup/Kconfig 2012-09-06 18:13:48.000000000 +0200
+++ ptxdist-2012.09.0/config/setup/Kconfig 2012-09-17 10:11:50.481985838 +0200
@@ -56,6 +56,14 @@
http://your.proxy.org:80
+config SETUP_HTTP_PROXY_TIMEOUT
+ prompt "HTTP Proxy timeout"
+ int
+ default "30"
+ help
+ Set maximum timeout in seconds for downloads via a http proxy
+
+
endmenu
menu "Project Searchpath"
diff -Naur orig/ptxdist-2012.09.0/config/setup/ptxdistrc.default ptxdist-2012.09.0/config/setup/ptxdistrc.default
--- orig/ptxdist-2012.09.0/config/setup/ptxdistrc.default 2012-09-06 18:13:48.000000000 +0200
+++ ptxdist-2012.09.0/config/setup/ptxdistrc.default 2012-09-17 09:11:43.399225416 +0200
@@ -18,7 +18,7 @@
#
PTXCONF_SETUP_FTP_PROXY=""
PTXCONF_SETUP_HTTP_PROXY=""
-
+PTXCONF_SETUP_HTTP_PROXY_TIMEOUT="30"
#
# Project Searchpath
#
diff -Naur orig/ptxdist-2012.09.0/scripts/lib/ptxd_make_get.sh ptxdist-2012.09.0/scripts/lib/ptxd_make_get.sh
--- orig/ptxdist-2012.09.0/scripts/lib/ptxd_make_get.sh 2012-09-06 18:13:48.000000000 +0200
+++ ptxdist-2012.09.0/scripts/lib/ptxd_make_get.sh 2012-09-17 10:14:11.037982356 +0200
@@ -43,6 +43,13 @@
#
local file="${url##*/}"
+ #
+ # Proxy timeout
+ local proxytimeout=${PTXCONF_SETUP_HTTP_PROXY_TIMEOUT}
+ if [ -z ${proxytimeout} ]; then
+ proxytimeout=30
+ fi
+
# remove any pending or half downloaded files
rm -f -- "${path}."*
@@ -50,7 +57,7 @@
wget \
--passive-ftp \
--progress=bar:force \
- --timeout=30 \
+ --timeout=${proxytimeout} \
--tries=5 \
${PTXDIST_QUIET:+--quiet} \
"${opts[@]}" \
--
Regards
Gavin
Eckelmann Aktiengesellschaft
Vorstand: Dr.-Ing. Gerd Eckelmann (Vorsitzender)
Dr.-Ing. Peter Cordes, Dr.-Ing. Frank-Thomas Mellert
Vorsitzender des Aufsichtsrats: Hubertus G. Krossa
Sitz der Gesellschaft: Wiesbaden Amtsgericht Wiesbaden HRB 12636
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ptxdist] making HTTP proxy timeout adjustable
2012-09-17 7:48 ` Juergen Beisert
2012-09-17 8:45 ` Schenk, Gavin
@ 2012-09-17 19:18 ` Robert Schwebel
1 sibling, 0 replies; 5+ messages in thread
From: Robert Schwebel @ 2012-09-17 19:18 UTC (permalink / raw)
To: ptxdist; +Cc: Schenk, Gavin
On Mon, Sep 17, 2012 at 09:48:46AM +0200, Juergen Beisert wrote:
> > +config SETUP_HTTP_PROXY_TIMEOUT
> > + prompt "HTTP Proxy timeout"
> > + int
> > + default "30"
> > + help
> > + Set maximum timeout for downloads via a http proxy
>
> Seconds? Hours? Months? Years?
Leap seconds :-)
rsc
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-09-17 19:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-17 7:19 [ptxdist] making HTTP proxy timeout adjustable Schenk, Gavin
2012-09-17 7:48 ` Juergen Beisert
2012-09-17 8:45 ` Schenk, Gavin
2012-09-17 8:55 ` Juergen Beisert
2012-09-17 19:18 ` Robert Schwebel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox