summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Peck <bpeck@redhat.com>2015-09-22 10:05:45 -0400
committerBill Peck <bpeck@redhat.com>2015-09-22 10:05:45 -0400
commit2faa69f00a172332b134d57e128e313acbf813a5 (patch)
tree97b8d9a46f232b03e56788aa21ee8fd6f506390a
parent511521305c0971925458e92d4d541b3f00281d8f (diff)
downloadtests-2faa69f00a172332b134d57e128e313acbf813a5.tar.gz
tests-2faa69f00a172332b134d57e128e313acbf813a5.tar.xz
tests-2faa69f00a172332b134d57e128e313acbf813a5.zip
restore boot order in rc.local since job will have aborted
-rwxr-xr-xfirmware/amd_seattle/runtest.sh12
1 files 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