代码拉取完成,页面将自动刷新
同步操作将从 src-anolis-os/grub2 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Hans de Goede <[email protected]>
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 <[email protected]>
---
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 ca95c0d1c..ad175870a 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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。