Skip to content
Snippets Groups Projects
Unverified Commit f7f659c2 authored by kb-light's avatar kb-light Committed by Matthias Schiffer
Browse files

gluon-web-network: make poe_passthrough more generic

parent 6f7504b4
No related branches found
No related tags found
No related merge requests found
...@@ -19,7 +19,7 @@ msgstr "Automatisch (RA/DHCPv6)" ...@@ -19,7 +19,7 @@ msgstr "Automatisch (RA/DHCPv6)"
msgid "Disabled" msgid "Disabled"
msgstr "Deaktiviert" msgstr "Deaktiviert"
msgid "Enable PoE passthrough" msgid "Enable PoE Passthrough"
msgstr "PoE-Passthrough aktivieren" msgstr "PoE-Passthrough aktivieren"
msgid "Enable meshing on the LAN interface" msgid "Enable meshing on the LAN interface"
......
...@@ -19,7 +19,7 @@ msgstr "Automatique (RA/DHCPv6)" ...@@ -19,7 +19,7 @@ msgstr "Automatique (RA/DHCPv6)"
msgid "Disabled" msgid "Disabled"
msgstr "Désactivé" msgstr "Désactivé"
msgid "Enable PoE passthrough" msgid "Enable PoE Passthrough"
msgstr "" msgstr ""
msgid "Enable meshing on the LAN interface" msgid "Enable meshing on the LAN interface"
......
...@@ -10,7 +10,7 @@ msgstr "" ...@@ -10,7 +10,7 @@ msgstr ""
msgid "Disabled" msgid "Disabled"
msgstr "" msgstr ""
msgid "Enable PoE passthrough" msgid "Enable PoE Passthrough"
msgstr "" msgstr ""
msgid "Enable meshing on the LAN interface" msgid "Enable meshing on the LAN interface"
......
...@@ -122,15 +122,20 @@ if sysconfig.lan_ifname then ...@@ -122,15 +122,20 @@ if sysconfig.lan_ifname then
end end
end end
if uci:get('system', 'gpio_switch_poe_passthrough') then local section
local s = f:section(Section) uci:foreach("system", "gpio_switch", function(s)
local poe_passthrough = s:option(Flag, "poe_passthrough", translate("Enable PoE passthrough")) if s[".name"]:match("poe") then
poe_passthrough.default = uci:get_bool("system", "gpio_switch_poe_passthrough", "value") if not section then
section = f:section(Section)
end
local poe = section:option(Flag, s[".name"], translate("Enable " .. s.name))
poe.default = uci:get_bool("system", s[".name"], "value")
function poe_passthrough:write(data) function poe:write(data)
uci:set('system', 'gpio_switch_poe_passthrough', 'value', data) uci:set("system", s[".name"], "value", data)
end
end end
end end)
function f:write() function f:write()
uci:set("network", "wan", "proto", ipv4.data) uci:set("network", "wan", "proto", ipv4.data)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment