420527
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
420527
From: Peter Jones <pjones@redhat.com>
420527
Date: Thu, 4 Oct 2018 14:22:09 -0400
420527
Subject: [PATCH] Reimplement boot_counter
420527
420527
This adds "increment" and "decrement" commands, and uses them to maintain our
420527
variables in 01_fallback_counter.  It also simplifies the counter logic, so
420527
that there are no nested tests that conflict with each other.
420527
420527
Apparently, this *really* wasn't tested well enough.
420527
420527
Resolves: rhbz#1614637
420527
Signed-off-by: Peter Jones <pjones@redhat.com>
420527
---
420527
 util/grub.d/01_fallback_counting.in | 4 ++++
420527
 1 file changed, 4 insertions(+)
420527
420527
diff --git a/util/grub.d/01_fallback_counting.in b/util/grub.d/01_fallback_counting.in
420527
index 6ca13da03df..1a0b5fbecfc 100644
420527
--- a/util/grub.d/01_fallback_counting.in
420527
+++ b/util/grub.d/01_fallback_counting.in
420527
@@ -1,5 +1,9 @@
420527
 #! /bin/sh -e
420527
 
420527
+if ! systemctl -q is-enabled greenboot.service >/dev/null 2>&1 ; then
420527
+  exit 0
420527
+fi
420527
+
420527
 # Boot Counting
420527
 cat << EOF
420527
 insmod increment