330-gluon-mesh-batman-adv-core-mesh-on-wan 431 B

123456789101112131415161718
  1. #!/usr/bin/lua
  2. local site = require 'gluon.site_config'
  3. local uci = require 'luci.model.uci'
  4. local c = uci.cursor()
  5. if not c:get('network', 'mesh_wan') then
  6. c:section('network', 'interface', 'mesh_wan',
  7. { ifname = 'br-wan'
  8. , proto = 'batadv'
  9. , mesh = 'bat0'
  10. , mesh_no_rebroadcast = '1'
  11. , auto = site.mesh_on_wan and 1 or 0
  12. })
  13. end
  14. c:save('network')