From d2052431dd4ab4c1c5e0ce406219e281df297715 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Fri, 12 Jun 2020 00:02:15 +0200 Subject: [PATCH] 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). --- .../luasrc/lib/gluon/config-mode/model/admin/wifi-config.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package/gluon-web-wifi-config/luasrc/lib/gluon/config-mode/model/admin/wifi-config.lua b/package/gluon-web-wifi-config/luasrc/lib/gluon/config-mode/model/admin/wifi-config.lua index 98501bd8..efc6d0f0 100644 --- a/package/gluon-web-wifi-config/luasrc/lib/gluon/config-mode/model/admin/wifi-config.lua +++ b/package/gluon-web-wifi-config/luasrc/lib/gluon/config-mode/model/admin/wifi-config.lua @@ -1,5 +1,6 @@ local iwinfo = require 'iwinfo' local uci = require("simple-uci").cursor() +local site = require 'gluon.site' local wireless = require 'gluon.wireless' @@ -155,6 +156,9 @@ if has_5ghz_radio() then for _, mesh_vif in ipairs(mesh_vifs_5ghz) do mesh_vif:depends(outdoor, false) + if outdoor.default then + mesh_vif.default = not site.wifi5.mesh.disabled(false) + end end function outdoor:write(data)