From: "Schenk, Gavin" <G.Schenk@eckelmann.de>
To: "ptxdist@pengutronix.de" <ptxdist@pengutronix.de>
Subject: [ptxdist] making HTTP proxy timeout adjustable
Date: Mon, 17 Sep 2012 07:19:54 +0000 [thread overview]
Message-ID: <D415CD2EC4182C4EAB90A76B7D9F16DCA96F26DF@EX-DAG02.eckelmann.group> (raw)
[-- 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
next reply other threads:[~2012-09-17 7:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-17 7:19 Schenk, Gavin [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=D415CD2EC4182C4EAB90A76B7D9F16DCA96F26DF@EX-DAG02.eckelmann.group \
--to=g.schenk@eckelmann.de \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox