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 4a897f74e8de85c5425938cdb6a3836e9c45c0e7..f5ab8582bcd4d2c9a02064c89fe7fc7c04bff7d7 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 @@ -1,16 +1,16 @@ #!/usr/bin/lua local sysconfig = require 'gluon.sysconfig' + +local lutil = require 'luci.util' local uci = require('luci.model.uci').cursor() -if not uci:get('network', 'client') then - uci:section('network', 'interface', 'client', - { - type = 'bridge', - } - ) -end +uci:section('network', 'interface', 'client', + { + type = 'bridge', + } +) local ifname = uci:get('network', 'client', 'ifname') @@ -21,6 +21,13 @@ if type(ifname) == 'string' then end end +if sysconfig.lan_ifname and not ifname and not uci:get_bool('network', 'mesh_lan', 'auto') then + for _, lanif in ipairs(lutil.split(sysconfig.lan_ifname, ' ')) do + uci:add_to_set('network', 'client', 'ifname', lanif) + end +end + + uci:set('network', 'client', 'macaddr', sysconfig.primary_mac) uci:save('network') diff --git a/package/gluon-luci-portconfig/Makefile b/package/gluon-luci-portconfig/Makefile index e2d0a22502324f0bf6eaceb991499aab13c8d745..d4590864ed8afb816b8002c1e8001a3f701ff949 100644 --- a/package/gluon-luci-portconfig/Makefile +++ b/package/gluon-luci-portconfig/Makefile @@ -18,7 +18,7 @@ define Package/gluon-luci-portconfig SECTION:=gluon CATEGORY:=Gluon TITLE:=Luci module for advanced ethernet port configuration - DEPENDS:=+gluon-luci-admin +gluon-mesh-batman-adv + DEPENDS:=+gluon-luci-admin +gluon-client-bridge endef define Build/Prepare 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 3224768c1cbb22941dea49d26341871c24aa98f5..4710d47c88617739ac25fbd25595fd0dce1f8a69 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 @@ -5,7 +5,6 @@ local sysctl = require 'gluon.sysctl' local site = require 'gluon.site_config' local uci = require('luci.model.uci').cursor() -local lutil = require 'luci.util' local gw_sel_class @@ -25,15 +24,8 @@ uci:section('batman-adv', 'mesh', 'bat0', ) uci:save('batman-adv') -if not uci:get('network', 'client', 'ifname') then - uci:add_to_set('network', 'client', 'ifname', 'bat0') - if sysconfig.lan_ifname and not site.mesh_on_lan then - for _, lanif in ipairs(lutil.split(sysconfig.lan_ifname, ' ')) do - uci:add_to_set('network', 'client', 'ifname', lanif) - end - end -end +uci:add_to_set('network', 'client', 'ifname', 'bat0') uci:set('network', 'client', 'proto', 'dhcpv6') uci:set('network', 'client', 'reqprefix', 'no')