Skip to content

Commit

Permalink
luci-app-attendedsysupgrade: Fix logic error in EFI image selection
Browse files Browse the repository at this point in the history
If a non-EFI image comes first in the list of images, it would have
been selected even on an EFI system.

Signed-off-by: Jakob Haufe <sur5r@sur5r.net>
  • Loading branch information
sur5r committed Feb 3, 2024
1 parent 1e1c6b8 commit 9a986e3
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,10 @@ return view.extend({
if (this.firmware.filesystem == image.filesystem) {
// x86 images can be combined-efi (EFI) or combined (BIOS)
if(this.firmware.target.indexOf("x86") != -1) {
if (this.data.efi && image.type == 'combined-efi') {
return image;
if (this.data.efi) {
if (image.type == 'combined-efi') {
return image;
}
} else if (image.type == 'combined') {
return image;
}
Expand Down

0 comments on commit 9a986e3

Please sign in to comment.