gluon-core: upgrade/220-interface-lan: whitespace cleanup

This commit is contained in:
Matthias Schiffer 2017-06-21 00:56:42 +02:00
parent 5b09c64186
commit 0db63008cd
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C

View File

@ -7,35 +7,35 @@ local sysconfig = require 'gluon.sysconfig'
local uci = require('simple-uci').cursor() local uci = require('simple-uci').cursor()
if not sysconfig.lan_ifname then if not sysconfig.lan_ifname then
os.exit(0) os.exit(0)
end end
uci:section('network', 'interface', 'mesh_lan', { uci:section('network', 'interface', 'mesh_lan', {
ifname = sysconfig.lan_ifname, ifname = sysconfig.lan_ifname,
type = 'bridge', type = 'bridge',
igmp_snooping = false, igmp_snooping = false,
proto = 'gluon_mesh', proto = 'gluon_mesh',
transitive = true, transitive = true,
fixed_mtu = true, fixed_mtu = true,
}) })
if uci:get('network', 'mesh_lan', 'auto') == nil then if uci:get('network', 'mesh_lan', 'auto') == nil then
local enable = site.mesh_on_lan local enable = site.mesh_on_lan
if enable then if enable then
local interfaces = uci:get_list('network', 'client', 'ifname') local interfaces = uci:get_list('network', 'client', 'ifname')
if interfaces then if interfaces then
for lanif in sysconfig.lan_ifname:gmatch('%S+') do for lanif in sysconfig.lan_ifname:gmatch('%S+') do
if util.contains(interfaces, lanif) then if util.contains(interfaces, lanif) then
enable = false enable = false
break break
end end
end end
end end
end end
uci:set('network', 'mesh_lan', 'auto', enable or false) uci:set('network', 'mesh_lan', 'auto', enable or false)
end end
uci:save('network') uci:save('network')