summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFlorian Eckert <fe@dev.tdt.de>2017-08-11 08:54:07 +0200
committerFlorian Eckert <fe@dev.tdt.de>2017-08-11 13:33:38 +0200
commit5371f159da1806dc58671c6e1f519a3c9b9d120f (patch)
treec7ae4c0f4c551abd750db212034d9c394a939a72
parent933e0f335c70c2b96ab05adb6f4d0d48d8034cfc (diff)
luci-app-mwan3: extend uci-default to set globals section if not present
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
-rwxr-xr-xapplications/luci-app-mwan3/root/etc/uci-defaults/60_luci-mwan37
1 files changed, 7 insertions, 0 deletions
diff --git a/applications/luci-app-mwan3/root/etc/uci-defaults/60_luci-mwan3 b/applications/luci-app-mwan3/root/etc/uci-defaults/60_luci-mwan3
index ff9a229edd..509a694364 100755
--- a/applications/luci-app-mwan3/root/etc/uci-defaults/60_luci-mwan3
+++ b/applications/luci-app-mwan3/root/etc/uci-defaults/60_luci-mwan3
@@ -8,6 +8,13 @@ uci -q batch <<-EOF >/dev/null
commit ucitrack
EOF
+uci -q get mwan3.globals >/dev/null || {
+ uci -q add mwan3 globals >/dev/null
+ uci -q rename mwan3.@globals[-1]="globals" >/dev/null
+ uci -q set mwan3.globals.initial_source="none" >/dev/null
+ uci commit mwan3
+}
+
# remove LuCI cache
rm -rf /tmp/luci-indexcache /tmp/luci-modulecache