safety first: section names, removing old mesh_interfaces
This commit is contained in:
parent
ae42e979c1
commit
2c418a6e66
@ -2,7 +2,7 @@
|
||||
|
||||
local uci = require('luci.model.uci').cursor()
|
||||
local site = require 'gluon.site_config'
|
||||
local interfaces='/lib/gluon/core/dynamic/interfaces'
|
||||
local interfaces='/lib/gluon/core/mesh_interfaces'
|
||||
|
||||
if site.mesh_on_wan then
|
||||
uci:section('babeld', 'interface', 'mesh_wan',
|
||||
@ -14,9 +14,12 @@ if site.mesh_on_wan then
|
||||
uci:add_to_set('firewall', 'mesh_babel', 'network', 'wan')
|
||||
end
|
||||
|
||||
uci:delete_all('babeld', 'interface')
|
||||
|
||||
pcall( function()
|
||||
for interface in io.lines(interfaces) do
|
||||
uci:section('babeld', 'interface', interface, { ifname = interface })
|
||||
int = string.gsub(interface,'[.-]','_')
|
||||
uci:section('babeld', 'interface', 'interface_' .. int, { ifname = interface })
|
||||
end
|
||||
end)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user