From: Stéphane Graber Date: Thu, 6 Feb 2014 22:11:51 +0000 (-0500) Subject: download: Fix previous change X-Git-Tag: lxc-1.0.0.beta4~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4eb706b3ce9891f86ff3f9b5b5d063922df9f6b6;p=thirdparty%2Flxc.git download: Fix previous change The previous change to support http proxies only worked when http_proxy was set... Instead add some detection code and only use :80 when using http_proxy. That's a bit of a workaround, but it's the only way I could find to get GPG to work with http_proxy. Signed-off-by: Stéphane Graber --- diff --git a/templates/lxc-download.in b/templates/lxc-download.in index 3c7d9264e..d615b8db6 100644 --- a/templates/lxc-download.in +++ b/templates/lxc-download.in @@ -32,7 +32,7 @@ DOWNLOAD_ARCH= DOWNLOAD_VARIANT="default" DOWNLOAD_SERVER="images.linuxcontainers.org" DOWNLOAD_KEYID="0xBAEFF88C22F6E216" -DOWNLOAD_KEYSERVER="hkp://pool.sks-keyservers.net:80" +DOWNLOAD_KEYSERVER="hkp://pool.sks-keyservers.net" DOWNLOAD_VALIDATE="true" DOWNLOAD_FLUSH_CACHE="false" DOWNLOAD_FORCE_CACHE="false" @@ -53,6 +53,11 @@ LXC_ROOTFS= LXC_MAPPED_UID= LXC_MAPPED_GID= +# Deal with GPG over http proxy +if [ -n "${http_proxy:-}" ]; then + DOWNLOAD_KEYSERVER="${DOWNLOAD_KEYSERVER}:80" +fi + # Some useful functions cleanup() { if [ -d "$DOWNLOAD_TEMP" ]; then