From: Stéphane Graber Date: Tue, 1 Apr 2014 01:43:27 +0000 (-0400) Subject: download: Set a 30s timeout for wget request X-Git-Tag: lxc-1.0.3~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a0718c498b8f0a816ec813b2bc573acd962d544b;p=thirdparty%2Flxc.git download: Set a 30s timeout for wget request Signed-off-by: Stéphane Graber Signed-off-by: Serge Hallyn --- diff --git a/templates/lxc-download.in b/templates/lxc-download.in index 487383e0a..a06c0a401 100644 --- a/templates/lxc-download.in +++ b/templates/lxc-download.in @@ -70,8 +70,8 @@ cleanup() { } download_file() { - if ! wget -q https://${DOWNLOAD_SERVER}/$1 -O $2 >/dev/null 2>&1; then - if ! wget -q http://${DOWNLOAD_SERVER}/$1 -O $2 >/dev/null 2>&1; then + if ! wget -T 30 -q https://${DOWNLOAD_SERVER}/$1 -O $2 >/dev/null 2>&1; then + if ! wget -T 30 -q http://${DOWNLOAD_SERVER}/$1 -O $2 >/dev/null 2>&1; then if [ "$3" = "noexit" ]; then return 1 else