generate a unique MAC
This commit is contained in:
parent
b7b385e797
commit
2fb3f9c8ae
|
@ -1,6 +1,7 @@
|
|||
#!/usr/bin/lua
|
||||
|
||||
local site = require 'gluon.site_config'
|
||||
local util = require 'gluon.util'
|
||||
local sysconfig = require 'gluon.sysconfig'
|
||||
local uci = require 'luci.model.uci'
|
||||
|
||||
|
@ -8,10 +9,11 @@ local c = uci.cursor()
|
|||
|
||||
if sysconfig.lan_ifname then
|
||||
c:section('network', 'interface', 'mesh_lan',
|
||||
{ ifname = sysconfig.lan_ifname
|
||||
, proto = 'batadv'
|
||||
, mesh = 'bat0'
|
||||
, auto = site.mesh_on_lan and 1 or 0
|
||||
{ ifname = sysconfig.lan_ifname
|
||||
, proto = 'batadv'
|
||||
, mesh = 'bat0'
|
||||
, macaddr = util.generate_mac(1, 1)
|
||||
, auto = site.mesh_on_lan and 1 or 0
|
||||
})
|
||||
|
||||
c:save('network')
|
||||
|
|
Loading…
Reference in New Issue