| |
@@ -0,0 +1,51 @@
|
| |
+ From 34318948d2c539608071df231c9ff79d04b27a15 Mon Sep 17 00:00:00 2001
|
| |
+ From: Christian Glombek <lorbus@fedoraproject.org>
|
| |
+ Date: Tue, 31 Jul 2018 11:12:06 +0200
|
| |
+ Subject: [PATCH 2/2] Boot Counting Adds 01_fallback_counting.in script to
|
| |
+ support boot counting before falling back to the previous menu entry
|
| |
+ automatically
|
| |
+
|
| |
+ ---
|
| |
+ Makefile.util.def | 6 ++++++
|
| |
+ util/grub.d/01_fallback_counting.in | 12 ++++++++++++
|
| |
+ 2 files changed, 18 insertions(+)
|
| |
+ create mode 100644 util/grub.d/01_fallback_counting.in
|
| |
+
|
| |
+ diff --git a/Makefile.util.def b/Makefile.util.def
|
| |
+ index aa650200b..29e0ea833 100644
|
| |
+ --- a/Makefile.util.def
|
| |
+ +++ b/Makefile.util.def
|
| |
+ @@ -442,6 +442,12 @@ script = {
|
| |
+ installdir = grubconf;
|
| |
+ };
|
| |
+
|
| |
+ +script = {
|
| |
+ + name = '01_fallback_counting';
|
| |
+ + common = util/grub.d/01_fallback_counting.in;
|
| |
+ + installdir = grubconf;
|
| |
+ +};
|
| |
+ +
|
| |
+ script = {
|
| |
+ name = '01_menu_auto_hide';
|
| |
+ common = util/grub.d/01_menu_auto_hide.in;
|
| |
+ diff --git a/util/grub.d/01_fallback_counting.in b/util/grub.d/01_fallback_counting.in
|
| |
+ new file mode 100644
|
| |
+ index 000000000..37ee9e6ee
|
| |
+ --- /dev/null
|
| |
+ +++ b/util/grub.d/01_fallback_counting.in
|
| |
+ @@ -0,0 +1,12 @@
|
| |
+ +#! /bin/sh -e
|
| |
+ +
|
| |
+ +# Boot Counting
|
| |
+ +if [ "\${boot_counter}" -a "\${boot_success}" = "0"]; then
|
| |
+ + if [ "\${boot_counter}" = "0" -o "\${boot_counter}" = "-1" ]; then
|
| |
+ + set default=1
|
| |
+ + set boot_counter=-1
|
| |
+ + else
|
| |
+ + set boot_counter=$((\${boot_counter}-1))
|
| |
+ + fi
|
| |
+ + save_env boot_counter
|
| |
+ +fi
|
| |
+ --
|
| |
+ 2.14.3
|
| |
+
|
| |
See https://github.com/rhboot/grub2/pull/24