]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
download: Set a 30s timeout for wget request
authorStéphane Graber <stgraber@ubuntu.com>
Tue, 1 Apr 2014 01:43:27 +0000 (21:43 -0400)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Tue, 1 Apr 2014 14:54:37 +0000 (09:54 -0500)
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
templates/lxc-download.in

index 487383e0a0fe10119fc77c34e6d5d0e1bab1c8c8..a06c0a401e98ef309d330ff8bc8a4bf665400f9e 100644 (file)
@@ -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