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>
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"
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