[lxc-devel] [PATCH] download: Set a 30s timeout for wget request

Serge Hallyn serge.hallyn at ubuntu.com
Tue Apr 1 05:11:42 UTC 2014


Quoting Stéphane Graber (stgraber at ubuntu.com):
> Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>

Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>

> ---
>  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 487383e..a06c0a4 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
> -- 
> 1.9.1
> 
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel


More information about the lxc-devel mailing list