Blame SOURCES/0002-Make-quiet-exit-on-missing-PK-KEK-not-return-error-s.patch

14a92e
From 946380463bb9a233381fc122a8374806d77b1778 Mon Sep 17 00:00:00 2001
14a92e
From: Peter Jones <pjones@redhat.com>
14a92e
Date: Mon, 23 Oct 2017 09:45:48 -0400
14a92e
Subject: [PATCH 2/2] Make quiet exit on missing PK/KEK not return error
14a92e
 status.
14a92e
14a92e
Signed-off-by: Peter Jones <pjones@redhat.com>
14a92e
---
14a92e
 src/dbxtool.c | 7 ++++---
14a92e
 1 file changed, 4 insertions(+), 3 deletions(-)
14a92e
14a92e
diff --git a/src/dbxtool.c b/src/dbxtool.c
14a92e
index 717c991..b2cb587 100644
14a92e
--- a/src/dbxtool.c
14a92e
+++ b/src/dbxtool.c
14a92e
@@ -541,13 +541,14 @@ check_pk_and_kek(bool force, bool quiet)
14a92e
 		}
14a92e
 	}
14a92e
 	if (!all_found) {
14a92e
-		if (!quiet) {
14a92e
+		if (quiet) {
14a92e
+			if (!force)
14a92e
+				exit(0);
14a92e
+		} else {
14a92e
 			if (!force)
14a92e
 				errx(1, "Not attempting to apply updates.");
14a92e
 			warnx("attempting to apply updates anyway.");
14a92e
 		}
14a92e
-		if (!force)
14a92e
-			exit(1);
14a92e
 	}
14a92e
 }
14a92e
 
14a92e
-- 
14a92e
2.14.2
14a92e