Commit 8b1ef754 by Stéphane Graber

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: 's avatarStéphane Graber <stgraber@ubuntu.com> Acked-by: 's avatarSerge E. Hallyn <serge.hallyn@ubuntu.com>
parent 232ba336
......@@ -116,8 +116,17 @@ gpg_setup() {
mkdir -p "$DOWNLOAD_TEMP/gpg"
chmod 700 "$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
success=1
break
fi
done
if [ -z "$success" ]; then
echo "ERROR: Unable to fetch GPG key from keyserver."
exit 1
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment