gluon-web-network: adjust toggling to new UCI bridge syntax
This commit is contained in:
parent
8caa119621
commit
0f959253b2
@ -87,12 +87,12 @@ if sysconfig.lan_ifname then
|
|||||||
s = f:section(Section)
|
s = f:section(Section)
|
||||||
|
|
||||||
local mesh_lan = s:option(Flag, "mesh_lan", translate("Enable meshing on the LAN interface"))
|
local mesh_lan = s:option(Flag, "mesh_lan", translate("Enable meshing on the LAN interface"))
|
||||||
mesh_lan.default = not uci:get_bool("network", "mesh_lan", "disabled")
|
mesh_lan.default = not uci:get_bool("network", "br_mesh_lan", "disabled")
|
||||||
|
|
||||||
function mesh_lan:write(data)
|
function mesh_lan:write(data)
|
||||||
uci:set("network", "mesh_lan", "disabled", not data)
|
uci:set("network", "br_mesh_lan", "disabled", not data)
|
||||||
|
|
||||||
local interfaces = uci:get_list("network", "client", "ifname")
|
local interfaces = uci:get_list("network", "br_client", "ports")
|
||||||
|
|
||||||
for lanif in sysconfig.lan_ifname:gmatch('%S+') do
|
for lanif in sysconfig.lan_ifname:gmatch('%S+') do
|
||||||
if data then
|
if data then
|
||||||
@ -102,7 +102,7 @@ if sysconfig.lan_ifname then
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
uci:set_list("network", "client", "ifname", interfaces)
|
uci:set_list("network", "br_client", "ports", interfaces)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user