]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
download: Fix previous change
authorStéphane Graber <stgraber@ubuntu.com>
Thu, 6 Feb 2014 22:11:51 +0000 (17:11 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Thu, 6 Feb 2014 22:11:51 +0000 (17:11 -0500)
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 <stgraber@ubuntu.com>
templates/lxc-download.in

index 3c7d9264ea39d650ae5c38a22997aad499dc03fa..d615b8db67c8f398485cf9e5703f5a0af439abb8 100644 (file)
@@ -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