luci-mod-system: flash.sh: gracefully handle missing sysupgrade.conf
authorJo-Philipp Wich <jo@mein.io>
Mon, 21 Oct 2019 13:30:22 +0000 (15:30 +0200)
committerJo-Philipp Wich <jo@mein.io>
Mon, 21 Oct 2019 13:30:22 +0000 (15:30 +0200)
Fixes: #3228
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-mod-system/htdocs/luci-static/resources/view/system/flash.js

index d18246b6be352f60d27dfc56a3d5acabfeecbafd..612c4a4f92d7efa3e7ffd2b0a738fb2fafd8781b 100644 (file)
@@ -517,7 +517,7 @@ return L.view.extend({
                o.forcewrite = true;
                o.rows = 30;
                o.load = function(section_id) {
-                       return fs.read('/etc/sysupgrade.conf', '');
+                       return L.resolveDefault(fs.read('/etc/sysupgrade.conf'), '');
                };