Merge ~rodsmith/plainbox-provider-checkbox:fix-pxeboot-variable into plainbox-provider-checkbox:master

Proposed by Rod Smith
Status: Merged
Approved by: Jeff Lane 
Approved revision: 682176feb595226dbe94078670f71711bcc1454f
Merged at revision: 9eeddb666d6eed2bf69bdd9e03ddd9a0b8f42d7f
Proposed branch: ~rodsmith/plainbox-provider-checkbox:fix-pxeboot-variable
Merge into: plainbox-provider-checkbox:master
Diff against target: 21 lines (+2/-1)
1 file modified
bin/efi-pxeboot (+2/-1)
Reviewer Review Type Date Requested Status
Paul Larson Approve
Review via email: mp+348283@code.launchpad.net

Description of the change

Fixes a bug that could cause the test script to crash because of an unassigned variable. While I was at it, I tweaked a test failure message to make it clearer that it describes the source of the failure (per a recent discussion with Jeff).

To post a comment you must log in.
Revision history for this message
Paul Larson (pwlars) wrote :

Looks good, +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/bin/efi-pxeboot b/bin/efi-pxeboot
2index 724fefb..24ac231 100755
3--- a/bin/efi-pxeboot
4+++ b/bin/efi-pxeboot
5@@ -49,6 +49,7 @@ def discover_data():
6 .splitlines())
7 boot_entries = {}
8 boot_order = []
9+ boot_current = ""
10 if len(bootinfo) > 1:
11 for s in bootinfo:
12 if "BootOrder" in s:
13@@ -103,7 +104,7 @@ def is_pxe_booted(boot_entries, boot_order, boot_current):
14 or "refind_" in desc:
15 # This string indicates a boot directly from the normal Ubuntu GRUB
16 # or rEFInd installation on the hard disk.
17- print("The system seems to have booted directly from the hard disk!")
18+ print("FAIL: The system has booted directly from the hard disk!")
19 retval = 1
20 elif "SATA" in desc or "Sata" in desc or "Hard Drive" in desc:
21 # These strings indicate booting with a "generic" disk entry (one

Subscribers

People subscribed via source and target branches