From 2faa69f00a172332b134d57e128e313acbf813a5 Mon Sep 17 00:00:00 2001 From: Bill Peck Date: Tue, 22 Sep 2015 10:05:45 -0400 Subject: restore boot order in rc.local since job will have aborted --- firmware/amd_seattle/runtest.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/firmware/amd_seattle/runtest.sh b/firmware/amd_seattle/runtest.sh index c0ee38b..4cbc84e 100755 --- a/firmware/amd_seattle/runtest.sh +++ b/firmware/amd_seattle/runtest.sh @@ -9,6 +9,12 @@ if [ -n "$LOCATION_URL" ]; then fi reboot_to_efi_shell() { + bootorder=$(efibootmgr | grep 'BootOrder' | awk '{ print $2 }') + # This job will end up aborting.. Next time the system is power cycled + # we will boot from the wrong device. restore the correct boot order and + # reboot again. + echo "efibootmgr -o $bootorder" >> /etc/rc.local + echo "reboot" >> /etc/rc.local efishell=$(efibootmgr | grep 'Built-in EFI Shell' | cut -c5-8 | head -n 1) # set next boot to efi shell efibootmgr -n $efishell @@ -16,10 +22,6 @@ reboot_to_efi_shell() { } enable_netboot() { - netboot=$(efibootmgr | grep 'Network Port00' | cut -c5-8) - bootoder=$(efibootmgr | grep 'BootOrder' | awk '{ print $2 }') - neworder=$(echo $netboot,$(echo $bootorder | sed -e "s/,$netboot//")) - efibootmgr -o $neworder } if [ -n "$RSTRNT_REBOOTCOUNT" ]; then @@ -29,7 +31,7 @@ if [ -n "$RSTRNT_REBOOTCOUNT" ]; then ./upBIOS $BIOS reboot_to_efi_shell else - enable_netboot + # This will never actually happen.. rstrnt-report-result $RSTRNT_TASKNAME PASS fi fi -- cgit