luci-app-attendedsysupgrade: add x86 efi/bios case
authorPaul Spooren <mail@aparcar.org>
Thu, 21 Sep 2023 18:05:05 +0000 (20:05 +0200)
committerPaul Spooren <mail@aparcar.org>
Fri, 22 Sep 2023 16:45:57 +0000 (18:45 +0200)
x86 is the only target that allows you to install either EFI or BIOS
images, thereby add an extra check for that.

Signed-off-by: Paul Spooren <mail@aparcar.org>
applications/luci-app-attendedsysupgrade/htdocs/luci-static/resources/view/attendedsysupgrade/overview.js

index af0b1eef7ad4ef93ee3cc82c2f71de3632834094..7b067d7e8da9638e1ff0877dab2a58dbdcad188e 100644 (file)
@@ -88,8 +88,11 @@ return view.extend({
                let image;
                for (image of images) {
                        if (this.firmware.filesystem == image.filesystem) {
-                               if (this.data.efi) {
-                                       if (image.type == 'combined-efi') {
+                               // x86 images can be combined-efi (EFI) or combined (BIOS)
+                               if(this.firmware.target.indexOf("x86")) {
+                                       if (this.data.efi && image.type == 'combined-efi') {
+                                               return image;
+                                       } else if (image.type == 'combined') {
                                                return image;
                                        }
                                } else {