From: Andrew Deng Date: Sat, 21 Nov 2020 01:57:09 +0000 (-0600) Subject: added standard resolver option to the lxc-download.in shell script X-Git-Tag: lxc-5.0.0~332^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=67e7ac7b851fa75bd2e2280fd83235a13452ee7a;p=thirdparty%2Flxc.git added standard resolver option to the lxc-download.in shell script Signed-off-by: Andrew Deng --- diff --git a/templates/lxc-download.in b/templates/lxc-download.in index 278487d22..d688b8f41 100644 --- a/templates/lxc-download.in +++ b/templates/lxc-download.in @@ -47,6 +47,7 @@ DOWNLOAD_USE_CACHE="false" DOWNLOAD_VALIDATE="true" DOWNLOAD_VARIANT="default" DOWNLOAD_TEMP= +DOWNLOAD_STANDARD_RESOLVER="false" LXC_MAPPED_GID= LXC_MAPPED_UID= @@ -130,6 +131,10 @@ gpg_setup() { mkdir -p "${DOWNLOAD_TEMP}/gpg" chmod 700 "${DOWNLOAD_TEMP}/gpg" + + if [ "${DOWNLOAD_STANDARD_RESOLVER}" = "true" ]; then + echo "standard-resolver" > "${DOWNLOAD_TEMP}/gpg/dirmngr.conf" + fi export GNUPGHOME="${DOWNLOAD_TEMP}/gpg" success= @@ -222,6 +227,7 @@ Optional arguments: [ --no-validate ]: Disable GPG validation (not recommended) [ --flush-cache ]: Flush the local copy (if present) [ --force-cache ]: Force the use of the local copy even if expired +[ --standard-resolver ]: Force the use of the standard resolver LXC internal arguments (do not pass manually!): [ --name ]: The container name @@ -260,6 +266,7 @@ while :; do --no-validate) DOWNLOAD_VALIDATE="false"; shift 1;; --flush-cache) DOWNLOAD_FLUSH_CACHE="true"; shift 1;; --force-cache) DOWNLOAD_FORCE_CACHE="true"; shift 1;; + --standard-resolver) STANDARD_RESOLVER="true"; shift 1;; --name) LXC_NAME="$2"; shift 2;; --path) LXC_PATH="$2"; shift 2;; --rootfs) LXC_ROOTFS="$2"; shift 2;;