From 65266c490a40e589bde23acb1bcac401813c43ce Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Wed, 9 Mar 2022 11:29:59 +0100 Subject: luci-app-attendedsysupgrade: fix missing efi path If running on a non EFI system, the file `/sys/firmware/efi` is not available and therefore results in an error of `fs.stat`. Wrap it with `L.resolveDefault` to avoid the error message and make it work on non-EFI devices again. Signed-off-by: Paul Spooren --- .../htdocs/luci-static/resources/view/attendedsysupgrade/overview.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'applications/luci-app-attendedsysupgrade/htdocs/luci-static/resources/view/attendedsysupgrade/overview.js') 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 8c1a5a84b1..a82f7bdbed 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 @@ -401,7 +401,7 @@ return view.extend({ return Promise.all([ L.resolveDefault(callPackagelist(), {}), L.resolveDefault(callSystemBoard(), {}), - fs.stat("/sys/firmware/efi"), + L.resolveDefault(fs.stat("/sys/firmware/efi"), null), fs.read("/proc/mounts"), uci.load('attendedsysupgrade'), ]); -- cgit v1.2.3