浏览代码

gluon-mesh-batman-adv-core: unconditionally set the WAN MAC address

This fixes MAC address conflicts on devices which use the eth0 as primary
address.
Matthias Schiffer 9 年之前
父节点
当前提交
34e0451e45

+ 4 - 7
package/gluon-mesh-batman-adv-core/files/lib/gluon/upgrade/300-gluon-mesh-batman-adv-core-wan

@@ -1,14 +1,11 @@
 #!/usr/bin/lua
 
-local sysconfig = require 'gluon.sysconfig'
 local util = require 'gluon.util'
 local uci = require('luci.model.uci').cursor()
 
 
-if sysconfig.wan_ifname:match('%.') then
-  -- fix up duplicate mac addresses (for mesh-on-WAN)
-  uci:set('network', 'wan', 'macaddr', util.generate_mac(1, 0))
-  uci:save('network')
-  uci:commit('network')
-end
+-- fix up duplicate mac addresses (for mesh-on-WAN)
+uci:set('network', 'wan', 'macaddr', util.generate_mac(1, 0))
+uci:save('network')
+uci:commit('network')