From: Marco Dickert Date: Thu, 28 Feb 2019 09:03:16 +0000 (+0100) Subject: gpg: use proxy, if http_proxy is set X-Git-Tag: lxc-3.2.0~129^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=414408015690652d42c3589443a2898d98a80613;p=thirdparty%2Flxc.git gpg: use proxy, if http_proxy is set Signed-off-by: Marco Dickert --- diff --git a/templates/lxc-download.in b/templates/lxc-download.in index 973783ba0..413b85f35 100644 --- a/templates/lxc-download.in +++ b/templates/lxc-download.in @@ -60,6 +60,7 @@ if [ -z "${DOWNLOAD_KEYSERVER:-}" ]; then # Deal with GPG over http proxy if [ -n "${http_proxy:-}" ]; then DOWNLOAD_KEYSERVER="hkp://p80.pool.sks-keyservers.net:80" + DOWNLOAD_GPG_PROXY="--keyserver-options http-proxy=\"${http_proxy}\"" fi fi @@ -133,8 +134,8 @@ gpg_setup() { success= for _ in $(seq 3); do - if gpg --keyserver "${DOWNLOAD_KEYSERVER}" \ - --recv-keys "${DOWNLOAD_KEYID}" >/dev/null 2>&1; then + if $(gpg --keyserver "${DOWNLOAD_KEYSERVER}" ${DOWNLOAD_GPG_PROXY:-} \ + --recv-keys "${DOWNLOAD_KEYID}" >/dev/null 2>&1); then success=1 break fi