diff --git a/package/gluon-client-bridge/luasrc/lib/gluon/upgrade/300-gluon-client-bridge-network b/package/gluon-client-bridge/luasrc/lib/gluon/upgrade/300-gluon-client-bridge-network index 8dae7e6d..723805e3 100755 --- a/package/gluon-client-bridge/luasrc/lib/gluon/upgrade/300-gluon-client-bridge-network +++ b/package/gluon-client-bridge/luasrc/lib/gluon/upgrade/300-gluon-client-bridge-network @@ -18,15 +18,13 @@ if site.next_node.ip6 then ip6 = site.next_node.ip6 .. '/128' end -uci:section('network', 'interface', 'client', - { - type = 'bridge', - proto = 'static', - macaddr = site.next_node.mac, - ipaddr = ip4, - ip6addr = ip6, - } -) +uci:section('network', 'interface', 'client', { + type = 'bridge', + proto = 'static', + macaddr = site.next_node.mac, + ipaddr = ip4, + ip6addr = ip6, +}) uci:delete('network', 'client', 'reqprefix') uci:delete('network', 'client', 'peerdns') @@ -61,11 +59,9 @@ uci:set('dhcp', dnsmasq, 'localise_queries', false) uci:set('dhcp', dnsmasq, 'rebind_protection', false) uci:delete('dhcp', 'client') -uci:section('dhcp', 'dhcp', 'client', - { - interface = 'client', - ignore = true, - } -) +uci:section('dhcp', 'dhcp', 'client', { + interface = 'client', + ignore = true, +}) uci:save('dhcp') diff --git a/package/gluon-mesh-batman-adv-core/luasrc/lib/gluon/upgrade/310-gluon-mesh-batman-adv-core-mesh b/package/gluon-mesh-batman-adv-core/luasrc/lib/gluon/upgrade/310-gluon-mesh-batman-adv-core-mesh index 3ae48c85..4a3c2c25 100755 --- a/package/gluon-mesh-batman-adv-core/luasrc/lib/gluon/upgrade/310-gluon-mesh-batman-adv-core-mesh +++ b/package/gluon-mesh-batman-adv-core/luasrc/lib/gluon/upgrade/310-gluon-mesh-batman-adv-core-mesh @@ -13,27 +13,23 @@ if site.mesh and site.mesh.batman_adv then end uci:delete('batman-adv', 'bat0') -uci:section('batman-adv', 'mesh', 'bat0', - { - orig_interval = 5000, - gw_mode = 'client', - gw_sel_class = gw_sel_class, - hop_penalty = 15, - multicast_mode = false, - } -) +uci:section('batman-adv', 'mesh', 'bat0', { + orig_interval = 5000, + gw_mode = 'client', + gw_sel_class = gw_sel_class, + hop_penalty = 15, + multicast_mode = false, +}) uci:save('batman-adv') uci:delete('network', 'bat0') -uci:section('network', 'interface', 'bat0', - { - ifname = 'bat0', - proto = 'none', - macaddr = sysconfig.primary_mac, - multicast_router = 2, - learning = false, - } -) +uci:section('network', 'interface', 'bat0', { + ifname = 'bat0', + proto = 'none', + macaddr = sysconfig.primary_mac, + multicast_router = 2, + learning = false, +}) local interfaces = uci:get_list('network', 'client', 'ifname') util.add_to_set(interfaces, 'bat0') diff --git a/package/gluon-mesh-batman-adv-core/luasrc/lib/gluon/upgrade/320-gluon-mesh-batman-adv-core-client-bridge b/package/gluon-mesh-batman-adv-core/luasrc/lib/gluon/upgrade/320-gluon-mesh-batman-adv-core-client-bridge index 2d356e30..ebe3edf2 100755 --- a/package/gluon-mesh-batman-adv-core/luasrc/lib/gluon/upgrade/320-gluon-mesh-batman-adv-core-client-bridge +++ b/package/gluon-mesh-batman-adv-core/luasrc/lib/gluon/upgrade/320-gluon-mesh-batman-adv-core-client-bridge @@ -5,22 +5,18 @@ local sysctl = require 'gluon.sysctl' local uci = require('simple-uci').cursor() -uci:section('network', 'interface', 'client', - { - robustness = 3, - query_interval = 2000, - query_response_interval = 500, - } -) +uci:section('network', 'interface', 'client', { + robustness = 3, + query_interval = 2000, + query_response_interval = 500, +}) uci:delete('network', 'client', 'igmp_snooping') uci:delete('network', 'client_lan') if sysconfig.lan_ifname then - uci:section('network', 'interface', 'client_lan', - { - unicast_flood = false, - } - ) + uci:section('network', 'interface', 'client_lan', { + unicast_flood = false, + }) uci:set('network', 'client_lan', 'ifname', sysconfig.lan_ifname) end @@ -28,15 +24,13 @@ uci:save('network') uci:delete('firewall', 'client') -uci:section('firewall', 'zone', 'client', - { - name = 'client', - network = {'client'}, - input = 'ACCEPT', - output = 'ACCEPT', - forward = 'REJECT', - } -) +uci:section('firewall', 'zone', 'client', { + name = 'client', + network = {'client'}, + input = 'ACCEPT', + output = 'ACCEPT', + forward = 'REJECT', +}) uci:delete('firewall', 'client_dns') diff --git a/package/gluon-mesh-batman-adv-core/luasrc/lib/gluon/upgrade/330-gluon-mesh-batman-adv-core-local-node b/package/gluon-mesh-batman-adv-core/luasrc/lib/gluon/upgrade/330-gluon-mesh-batman-adv-core-local-node index ff1f12f4..f26ba1a0 100755 --- a/package/gluon-mesh-batman-adv-core/luasrc/lib/gluon/upgrade/330-gluon-mesh-batman-adv-core-local-node +++ b/package/gluon-mesh-batman-adv-core/luasrc/lib/gluon/upgrade/330-gluon-mesh-batman-adv-core-local-node @@ -8,73 +8,57 @@ local uci = require('simple-uci').cursor() uci:delete('network', 'local_node_dev') -uci:section('network', 'device', 'local_node_dev', - { - name = 'local-node', - ifname = 'br-client', - type = 'macvlan', - macaddr = sysconfig.primary_mac, - } -) +uci:section('network', 'device', 'local_node_dev', { + name = 'local-node', + ifname = 'br-client', + type = 'macvlan', + macaddr = sysconfig.primary_mac, +}) uci:delete('network', 'local_node') -uci:section('network', 'interface', 'local_node', - { - ifname = 'local-node', - proto = 'dhcpv6', - reqprefix = 'no', - peerdns = true, - sourcefilter = false, - keep_ra_dnslifetime = true, - } -) - -if site.dns and site.dns.servers then - uci:set('network', 'local-node', 'peerdns','0') -end +uci:section('network', 'interface', 'local_node', { + ifname = 'local-node', + proto = 'dhcpv6', + reqprefix = 'no', + peerdns = not (site.dns and site.dns.servers), + sourcefilter = false, + keep_ra_dnslifetime = true, +}) uci:delete('network', 'local_node_route6') -uci:section('network', 'route6', 'local_node_route6', - { - interface = 'local-node', - target = site.prefix6, - gateway = '::', - } -) +uci:section('network', 'route6', 'local_node_route6', { + interface = 'local-node', + target = site.prefix6, + gateway = '::', +}) uci:save('network') uci:delete('firewall', 'local_node') -uci:section('firewall', 'zone', 'local_node', - { - name = 'local_node', - network = {'local_node'}, - input = 'ACCEPT', - output = 'ACCEPT', - forward = 'REJECT', - } -) +uci:section('firewall', 'zone', 'local_node', { + name = 'local_node', + network = {'local_node'}, + input = 'ACCEPT', + output = 'ACCEPT', + forward = 'REJECT', +}) -uci:section('firewall', 'rule', 'local_node_dns', - { - name = 'local_node_dns', - src = 'local_node', - dest_port = '53', - target = 'REJECT', - } -) +uci:section('firewall', 'rule', 'local_node_dns', { + name = 'local_node_dns', + src = 'local_node', + dest_port = '53', + target = 'REJECT', +}) uci:save('firewall') uci:delete('dhcp', 'local_node') -uci:section('dhcp', 'dhcp', 'local_node', - { - interface = 'local_node', - ignore = true, - } -) +uci:section('dhcp', 'dhcp', 'local_node', { + interface = 'local_node', + ignore = true, +}) uci:save('dhcp')