From 9a986e323cd3703469138c44eb638e94bb8c46ee Mon Sep 17 00:00:00 2001 From: Jakob Haufe Date: Sat, 3 Feb 2024 20:22:21 +0100 Subject: [PATCH] luci-app-attendedsysupgrade: Fix logic error in EFI image selection 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 --- .../resources/view/attendedsysupgrade/overview.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/applications/luci-app-attendedsysupgrade/htdocs/luci-static/resources/view/attendedsysupgrade/overview.js b/applications/luci-app-attendedsysupgrade/htdocs/luci-static/resources/view/attendedsysupgrade/overview.js index 450af354967b..29517d1e49f7 100644 --- a/applications/luci-app-attendedsysupgrade/htdocs/luci-static/resources/view/attendedsysupgrade/overview.js +++ b/applications/luci-app-attendedsysupgrade/htdocs/luci-static/resources/view/attendedsysupgrade/overview.js @@ -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; }