Initial commit.

This commit is contained in:
2021-05-24 22:18:33 +03:00
commit e2954d55f4
3701 changed files with 330017 additions and 0 deletions

25
grub.d/10_reset_boot_success Executable file
View File

@@ -0,0 +1,25 @@
#! /bin/sh -e
# Reset Boot Success
#
# The 08_fallback_counting and 12_menu_auto_hide snippets rely on this one
# and need to be kept in sync.
#
# The boot_success var needs to be set to 1 from userspace to mark a boot successful.
cat << EOF
# Hiding the menu is ok if last boot was ok or if this is a first boot attempt to boot the entry
if [ "\${boot_success}" = "1" -o "\${boot_indeterminate}" = "1" ]; then
set menu_hide_ok=1
else
set menu_hide_ok=0
fi
# Reset boot_indeterminate after a successful boot
if [ "\${boot_success}" = "1" ] ; then
set boot_indeterminate=0
# Avoid boot_indeterminate causing the menu to be hidden more then once
elif [ "\${boot_indeterminate}" = "1" ]; then
set boot_indeterminate=2
fi
# Reset boot_success for current boot
set boot_success=0
save_env boot_success boot_indeterminate
EOF