Re: [ptxdist] making HTTP proxy timeout adjustable

2012-09-17 Thread Juergen Beisert
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.0
 +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


Re: [ptxdist] making HTTP proxy timeout adjustable

2012-09-17 Thread Schenk, Gavin

 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.0 
+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.0 +0200
+++ ptxdist-2012.09.0/config/setup/ptxdistrc.default2012-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.0 +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


Re: [ptxdist] making HTTP proxy timeout adjustable

2012-09-17 Thread Juergen Beisert
Schenk, Gavin wrote:
  Seconds? Hours? Months? Years?

 seconds :)

\o/

Regards,
Juergen

-- 
Pengutronix e.K.  | Juergen Beisert |
Linux Solutions for Science and Industry  | http://www.pengutronix.de/  |

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] making HTTP proxy timeout adjustable

2012-09-17 Thread Robert Schwebel
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- |

-- 
ptxdist mailing list
ptxdist@pengutronix.de