Skip to content

Commit

Permalink
lxc-download.in / allow setting keyserver from env
Browse files Browse the repository at this point in the history
Checks if DOWNLOAD_KEYSERVER has already been set in the environment before setting a value

Signed-off-by: Tai Kedzierski <dch.tai@gmail.com>
  • Loading branch information
taikedz authored and stgraber committed Mar 20, 2017
1 parent 6db9617 commit c586a4d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions templates/lxc-download.in
Expand Up @@ -34,7 +34,6 @@ DOWNLOAD_FLUSH_CACHE="false"
DOWNLOAD_FORCE_CACHE="false"
DOWNLOAD_INTERACTIVE="false"
DOWNLOAD_KEYID="0xE7FB0CAEC8173D669066514CBAEFF88C22F6E216"
DOWNLOAD_KEYSERVER="hkp://pool.sks-keyservers.net"
DOWNLOAD_LIST_IMAGES="false"
DOWNLOAD_MODE="system"
DOWNLOAD_READY_GPG="false"
Expand All @@ -54,9 +53,13 @@ LXC_NAME=
LXC_PATH=
LXC_ROOTFS=

# Deal with GPG over http proxy
if [ -n "${http_proxy:-}" ]; then
DOWNLOAD_KEYSERVER="hkp://p80.pool.sks-keyservers.net:80"
if [ -z "${DOWNLOAD_KEYSERVER+x}" ]; then
DOWNLOAD_KEYSERVER="hkp://pool.sks-keyservers.net"

# Deal with GPG over http proxy
if [ -n "${http_proxy:-}" ]; then
DOWNLOAD_KEYSERVER="hkp://p80.pool.sks-keyservers.net:80"
fi
fi

# Make sure the usual locations are in PATH
Expand Down

0 comments on commit c586a4d

Please sign in to comment.