Subversion Repositories configs

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
192 - 1
#! /bin/sh -e
2
# Reset Boot Success
3
#
4
# The 08_fallback_counting and 12_menu_auto_hide snippets rely on this one
5
# and need to be kept in sync.
6
#
7
# The boot_success var needs to be set to 1 from userspace to mark a boot successful.
8
cat << EOF
9
# Hiding the menu is ok if last boot was ok or if this is a first boot attempt to boot the entry
10
if [ "\${boot_success}" = "1" -o "\${boot_indeterminate}" = "1" ]; then
11
  set menu_hide_ok=1
12
else
13
  set menu_hide_ok=0
14
fi
15
# Reset boot_indeterminate after a successful boot
16
if [ "\${boot_success}" = "1" ] ; then
17
  set boot_indeterminate=0
18
# Avoid boot_indeterminate causing the menu to be hidden more then once
19
elif [ "\${boot_indeterminate}" = "1" ]; then
20
  set boot_indeterminate=2
21
fi
22
# Reset boot_success for current boot
23
set boot_success=0
24
save_env boot_success boot_indeterminate
25
EOF