[grub]: Allow ONiE oneshoot boot for FW update. (#3935)

Added ONiE oneshoot boot feature

Signed-off-by: Nazarii Hnydyn <nazariig@mellanox.com>
This commit is contained in:
Nazarii Hnydyn 2020-01-22 01:50:02 +02:00 committed by lguohan
parent d0d1a5592b
commit bcc4e55742

View File

@ -557,14 +557,20 @@ cat <<EOF >> $grub_cfg
if [ -s \$prefix/grubenv ]; then
load_env
fi
if [ "\${saved_entry}" ] ; then
if [ "\${saved_entry}" ]; then
set default="\${saved_entry}"
fi
if [ "\${next_entry}" ] ; then
if [ "\${next_entry}" ]; then
set default="\${next_entry}"
set next_entry=
unset next_entry
save_env next_entry
fi
if [ "\${onie_entry}" ]; then
set next_entry="\${default}"
set default="\${onie_entry}"
unset onie_entry
save_env onie_entry next_entry
fi
EOF