Skip to content

Commit

Permalink
[grub]: Allow ONiE oneshoot boot for FW update. (sonic-net#3935)
Browse files Browse the repository at this point in the history
Added ONiE oneshoot boot feature

Signed-off-by: Nazarii Hnydyn <nazariig@mellanox.com>
  • Loading branch information
nazariig authored and tiantianlv committed Apr 24, 2020
1 parent c7d17f8 commit 343211a
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions installer/x86_64/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -555,15 +555,21 @@ EOF
# Add the logic to support grub-reboot and grub-set-default
cat <<EOF >> $grub_cfg
if [ -s \$prefix/grubenv ]; then
load_env
load_env
fi
if [ "\${saved_entry}" ] ; then
set default="\${saved_entry}"
if [ "\${saved_entry}" ]; then
set default="\${saved_entry}"
fi
if [ "\${next_entry}" ] ; then
set default="\${next_entry}"
set next_entry=
save_env next_entry
if [ "\${next_entry}" ]; then
set default="\${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
Expand Down

0 comments on commit 343211a

Please sign in to comment.