1
0
mirror of https://github.com/freifunk-gluon/packages.git synced 2024-06-13 18:53:56 +02:00
gluon-packages/gluon/gluon-mesh-batman-adv/files/lib/gluon/upgrade/mesh-batman-adv/invariant/030-mesh-on-wan
2014-07-16 16:11:31 +02:00

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')