grub2/0195-00_menu_auto_hide-Reduce-number-of-save_env-calls.patch
Javier Martinez Canillas 1f092caba7
Drop two efinet patches that were causing issues and a bunch of other fixes
Add comments and revert logic changes in 01_fallback_counting
Remove quotes when reading ID value from /etc/os-release
  Related: rhbz#1650706
blscfg: expand grub_users before passing to grub_normal_add_menu_entry()
  Resolves: rhbz#1650706
Drop buggy downstream patch "efinet: retransmit if our device is busy"
  Resolves: rhbz#1649048
Make the menu entry users option argument to be optional
  Related: rhbz#1652434
10_linux_bls: add missing menu entries options
  Resolves: rhbz#1652434
Drop "Be more aggro about actually using the *configured* network device."
  Resolves: rhbz#1654388
Fix menu entry selection based on title
  Resolves: rhbz#1654936

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2018-12-01 03:28:36 +01:00

41 lines
1.6 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Wed, 27 Jun 2018 13:33:43 +0200
Subject: [PATCH] 00_menu_auto_hide: Reduce number of save_env calls
Normally boot_success will be 1 on every boot (as normally the
previous boot will have been successful). This means that we end
up in the code-path to set boot_indeterminate to 0 every boot.
So we do 2 separate save_env calls each boot, one for boot_indeterminate
and one for boot_success. This results in 2 writes to the disk.
This commit makes us save both boot_success and boot_indeterminate
in a single call, reducing the number of writes, this reducing wear
and tear on the underlying storage.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
util/grub.d/00_menu_auto_hide.in | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/util/grub.d/00_menu_auto_hide.in b/util/grub.d/00_menu_auto_hide.in
index ca95c0d1c9f..ad175870a54 100644
--- a/util/grub.d/00_menu_auto_hide.in
+++ b/util/grub.d/00_menu_auto_hide.in
@@ -19,14 +19,12 @@ fi
# Reset boot_indeterminate after a successful boot
if [ "\${boot_success}" = "1" ] ; then
set boot_indeterminate=0
- save_env boot_indeterminate
# Avoid boot_indeterminate causing the menu to be hidden more then once
elif [ "\${boot_indeterminate}" = "1" ]; then
set boot_indeterminate=2
- save_env boot_indeterminate
fi
set boot_success=0
-save_env boot_success
+save_env boot_success boot_indeterminate
if [ x\$feature_timeout_style = xy ] ; then
if [ "\${menu_show_once}" ]; then