From e6ee584a15cebe1be9713c7c89681dba7f65ab63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= Date: Mon, 31 Mar 2014 21:43:27 -0400 Subject: [PATCH] download: Set a 30s timeout for wget request MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber Signed-off-by: Serge Hallyn --- templates/lxc-download.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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