gluon-web-network: accept .*poe_passthough.* as uci section for PoE passthrough
This commit is contained in:
parent
d51f2098a3
commit
05a56d1c46
@ -122,13 +122,14 @@ if sysconfig.lan_ifname then
|
||||
end
|
||||
end
|
||||
|
||||
if uci:get('system', 'gpio_switch_poe_passthrough') then
|
||||
local poe_section = uci:get_first("system", "gpio_switch")
|
||||
if poe_section:match("poe_passthrough") then
|
||||
local s = f:section(Section)
|
||||
local poe_passthrough = s:option(Flag, "poe_passthrough", translate("Enable PoE passthrough"))
|
||||
poe_passthrough.default = uci:get_bool("system", "gpio_switch_poe_passthrough", "value")
|
||||
poe_passthrough.default = uci:get_bool("system", poe_section, "value")
|
||||
|
||||
function poe_passthrough:write(data)
|
||||
uci:set('system', 'gpio_switch_poe_passthrough', 'value', data)
|
||||
uci:set('system', poe_section, 'value', data)
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user