grub2/0242-Fix-boot-counting-grub.cfg-snippet-creation.patch
Peter Jones bda81f02f1 Fix grub.cfg boot counting snippet generation (lorbus)
Resolves: rhbz#1614637

Signed-off-by: Peter Jones <pjones@redhat.com>
2018-10-02 13:34:30 -04:00

27 lines
887 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Christian Glombek <lorbus@fedoraproject.org>
Date: Tue, 2 Oct 2018 15:41:18 +0200
Subject: [PATCH] Fix boot counting grub.cfg snippet creation Fixes BZ1614637
---
util/grub.d/01_fallback_counting.in | 2 ++
1 file changed, 2 insertions(+)
diff --git a/util/grub.d/01_fallback_counting.in b/util/grub.d/01_fallback_counting.in
index ecfc7401474..afe06199a93 100644
--- a/util/grub.d/01_fallback_counting.in
+++ b/util/grub.d/01_fallback_counting.in
@@ -1,6 +1,7 @@
#! /bin/sh -e
# Boot Counting
+cat << EOF
if [ "\${boot_counter}" -a "\${boot_success}" = "0" ]; then
if [ "\${boot_counter}" = "0" -o "\${boot_counter}" = "-1" ]; then
set default=1
@@ -10,3 +11,4 @@ if [ "\${boot_counter}" -a "\${boot_success}" = "0" ]; then
fi
save_env boot_counter
fi
+EOF
\ No newline at end of file