From ee9295c88cbfebdd7cd5f0d682c1abe6eb477408 Mon Sep 17 00:00:00 2001 From: Nazarii Hnydyn Date: Wed, 22 Jan 2020 01:50:02 +0200 Subject: [PATCH] [grub]: Allow ONiE oneshoot boot for FW update. (#3935) Added ONiE oneshoot boot feature Signed-off-by: Nazarii Hnydyn --- installer/x86_64/install.sh | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/installer/x86_64/install.sh b/installer/x86_64/install.sh index 2cd579e28b29..78e8e2f4623b 100755 --- a/installer/x86_64/install.sh +++ b/installer/x86_64/install.sh @@ -555,15 +555,21 @@ EOF # Add the logic to support grub-reboot and grub-set-default cat <> $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