gluon-config-mode: fix wizard
Due to my previous two commits configmode was broken when either meshvpn or bandwidth limit was disabled. This fixes it but there may be a cleaner solution provided by luci.
This commit is contained in:
parent
566faeb6ca
commit
5b8e044893
@ -69,12 +69,22 @@ function f.handle(self, state, data)
|
|||||||
uci:save("autoupdater")
|
uci:save("autoupdater")
|
||||||
uci:commit("autoupdater")
|
uci:commit("autoupdater")
|
||||||
|
|
||||||
uci:set("gluon-simple-tc", meshvpn_name, "interface")
|
-- checks for nil needed due to o:depends(...)
|
||||||
uci:set("gluon-simple-tc", meshvpn_name, "enabled", data._limit_enabled)
|
if data._limit_enabled ~= nil then
|
||||||
uci:set("gluon-simple-tc", meshvpn_name, "ifname", "mesh-vpn")
|
uci:set("gluon-simple-tc", meshvpn_name, "interface")
|
||||||
uci:set("gluon-simple-tc", meshvpn_name, "limit_ingress", data._limit_ingress)
|
uci:set("gluon-simple-tc", meshvpn_name, "enabled", data._limit_enabled)
|
||||||
uci:set("gluon-simple-tc", meshvpn_name, "limit_egress", data._limit_egress)
|
uci:set("gluon-simple-tc", meshvpn_name, "ifname", "mesh-vpn")
|
||||||
uci:commit("gluon-simple-tc")
|
|
||||||
|
if data._limit_ingress ~= nil then
|
||||||
|
uci:set("gluon-simple-tc", meshvpn_name, "limit_ingress", data._limit_ingress)
|
||||||
|
end
|
||||||
|
|
||||||
|
if data._limit_egress ~= nil then
|
||||||
|
uci:set("gluon-simple-tc", meshvpn_name, "limit_egress", data._limit_egress)
|
||||||
|
end
|
||||||
|
|
||||||
|
uci:commit("gluon-simple-tc")
|
||||||
|
end
|
||||||
|
|
||||||
uci:set("fastd", meshvpn_name, "enabled", data._meshvpn)
|
uci:set("fastd", meshvpn_name, "enabled", data._meshvpn)
|
||||||
uci:save("fastd")
|
uci:save("fastd")
|
||||||
|
Loading…
Reference in New Issue
Block a user