gluon-web-wifi-config: default to enabled 5GHz mesh interfaces when disabling outdoor mode

When disabling outdoor mode, 5GHz mesh interfaces should be enabled by
default again (unless disabled in site.conf).
This commit is contained in:
Matthias Schiffer 2020-06-12 00:02:15 +02:00
parent 3c2593b684
commit d2052431dd
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C

View File

@ -1,5 +1,6 @@
local iwinfo = require 'iwinfo' local iwinfo = require 'iwinfo'
local uci = require("simple-uci").cursor() local uci = require("simple-uci").cursor()
local site = require 'gluon.site'
local wireless = require 'gluon.wireless' local wireless = require 'gluon.wireless'
@ -155,6 +156,9 @@ if has_5ghz_radio() then
for _, mesh_vif in ipairs(mesh_vifs_5ghz) do for _, mesh_vif in ipairs(mesh_vifs_5ghz) do
mesh_vif:depends(outdoor, false) mesh_vif:depends(outdoor, false)
if outdoor.default then
mesh_vif.default = not site.wifi5.mesh.disabled(false)
end
end end
function outdoor:write(data) function outdoor:write(data)