luci-app-mwan3: extend uci-default to set globals section if not present

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
Florian Eckert 2017-08-11 08:54:07 +02:00
parent 933e0f335c
commit 5371f159da

View file

@ -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