- Always set the default boot selection to $saved_entry

- Always reset $saved_entry to the NOS boot selection.
  The purpose of this change is to make transitions to and from ONIE
  for update purposes more robust. Every boot selection to ONIE is
  automatically a boot-once choice.
This commit is contained in:
Jeffrey Townsend
2016-11-17 19:25:25 +00:00
parent 2a37f60622
commit f6dc473cf8

View File

@@ -419,8 +419,17 @@ terminal_input serial
terminal_output serial
set timeout=5
# Always boot the saved_entry value
load_env
if [ "${saved_entry}" ] ; then
set default="${saved_entry}"
fi
menuentry %(boot_menu_entry)s {
search --no-floppy --label --set=root ONL-BOOT
# Always return to this entry by default.
set saved_entry="0"
save_env saved_entry
echo 'Loading %(boot_loading_name)s ...'
insmod gzio
insmod part_msdos
@@ -431,6 +440,9 @@ menuentry %(boot_menu_entry)s {
# Menu entry to chainload ONIE
menuentry ONIE {
search --no-floppy --label --set=root ONIE-BOOT
# Always return to entry 0 by default.
set saved_entry="0"
save_env saved_entry
echo 'Loading ONIE ...'
chainloader +1
}