luci-mod-system: mounts.js: implicitely create globals section
authorJo-Philipp Wich <jo@mein.io>
Sat, 21 Sep 2019 16:43:42 +0000 (18:43 +0200)
committerJo-Philipp Wich <jo@mein.io>
Sat, 21 Sep 2019 16:43:42 +0000 (18:43 +0200)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-mod-system/htdocs/luci-static/resources/view/system/mounts.js

index b9028b20e7ae6d2469a25a4d929c5aee863f1cc3..dfc17ee732519b3db2b8dd4616e9428c734d58f1 100644 (file)
@@ -161,6 +161,9 @@ return L.view.extend({
                        btrfs: results[6]
                };
 
+               if (!uci.sections('fstab', 'global').length)
+                       uci.add('fstab', 'global');
+
                m = new form.Map('fstab', _('Mount Points'));
 
                s = m.section(form.TypedSection, 'global', _('Global Settings'));