mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-27 12:37:35 +00:00
lxc-download: Attempt to get the GPG key 3 times
This is to deal with the GPG pool occasionaly yielding broken servers. Signed-off-by: Stéphane Graber <stgraber@ubuntu.com> Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
parent
e5469dadd9
commit
809a1539a3
@ -116,8 +116,17 @@ gpg_setup() {
|
|||||||
mkdir -p "$DOWNLOAD_TEMP/gpg"
|
mkdir -p "$DOWNLOAD_TEMP/gpg"
|
||||||
chmod 700 "$DOWNLOAD_TEMP/gpg"
|
chmod 700 "$DOWNLOAD_TEMP/gpg"
|
||||||
export GNUPGHOME="$DOWNLOAD_TEMP/gpg"
|
export GNUPGHOME="$DOWNLOAD_TEMP/gpg"
|
||||||
if ! gpg --keyserver $DOWNLOAD_KEYSERVER \
|
|
||||||
|
success=
|
||||||
|
for i in $(seq 3); do
|
||||||
|
if gpg --keyserver $DOWNLOAD_KEYSERVER \
|
||||||
--recv-keys ${DOWNLOAD_KEYID} >/dev/null 2>&1; then
|
--recv-keys ${DOWNLOAD_KEYID} >/dev/null 2>&1; then
|
||||||
|
success=1
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -z "$success" ]; then
|
||||||
echo "ERROR: Unable to fetch GPG key from keyserver."
|
echo "ERROR: Unable to fetch GPG key from keyserver."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user