This repository has been archived on 2024-05-11. You can view files and clone it, but cannot push or open issues or pull requests.
gluon-firmware/package/gluon-mesh-batman-adv-core/files/lib/gluon/upgrade/330-gluon-mesh-batman-adv-c...

19 lines
411 B
Lua
Executable File

#!/usr/bin/lua
local site = require 'gluon.site_config'
local uci = require 'luci.model.uci'
local c = uci.cursor()
if not c:get('network', 'mesh_wan') then
c:section('network', 'interface', 'mesh_wan',
{ ifname = 'br-wan'
, proto = 'batadv'
, mesh = 'bat0'
, auto = site.mesh_on_wan and 1 or 0
})
end
c:save('network')
c:commit('network')