The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxc/pull/3468

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
Use the result of the gpg command, not the result when executing the result of the gpg command.

In my understanding, we want to execute the gpg command and use its return code. We do not want to execute the gpg command, then collect its output, execute that and then return the exit code from that command.


From 18e18d4c31d39f12c87044db6d2d2f03163c8171 Mon Sep 17 00:00:00 2001
From: Johannes Kastl <ka...@b1-systems.de>
Date: Tue, 30 Jun 2020 18:51:20 +0200
Subject: [PATCH] templates/lxc-download.in: fix wrong if condition (use the
 result of the gpg command, not the result when executing the result of the
 gpg command)

Signed-off-by: Johannes Kastl <ka...@b1-systems.de>
---
 templates/lxc-download.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/templates/lxc-download.in b/templates/lxc-download.in
index 58d063f4c2..f69b18fd42 100644
--- a/templates/lxc-download.in
+++ b/templates/lxc-download.in
@@ -134,8 +134,8 @@ gpg_setup() {
 
   success=
   for _ in $(seq 3); do
-    if $(gpg --keyserver "${DOWNLOAD_KEYSERVER}" ${DOWNLOAD_GPG_PROXY:-} \
-      --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
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to