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: 's avatarStéphane Graber <stgraber@ubuntu.com>
parent ca0abdee
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment