gluon-core: remove nixio dependency

luci-lib-nixio pulls in luci-base, yet only a single function from
nixio was used. In my test case this saved roughly 200kb from the
compressed image when compiling a bare gluon (i.e. no configmode).
This commit is contained in:
Nils Schneider 2015-01-06 03:09:07 +01:00
parent a1d8c7ea0f
commit e0706e2b6a
2 changed files with 3 additions and 3 deletions

View File

@ -12,7 +12,7 @@ define Package/gluon-core
SECTION:=gluon
CATEGORY:=Gluon
TITLE:=Base files of Gluon
DEPENDS:=+gluon-config +lua-platform-info +luci-lib-nixio +odhcp6c +firewall
DEPENDS:=+gluon-config +lua-platform-info +odhcp6c +firewall
endef
define Package/gluon-core/description

View File

@ -27,7 +27,6 @@ local os = os
local string = string
local tonumber = tonumber
local nixio = require 'nixio'
local sysconfig = require 'gluon.sysconfig'
@ -71,7 +70,8 @@ end
-- (4, 0): mesh VPN
function generate_mac(f, i)
local m1, m2, m3, m4, m5, m6 = string.match(sysconfig.primary_mac, '(%x%x):(%x%x):(%x%x):(%x%x):(%x%x):(%x%x)')
m1 = nixio.bit.bor(tonumber(m1, 16), 0x02)
m1 = tonumber(m1, 16)
m1 = math.floor(m1/4) * 4 + 2 + m1 % 2
m2 = (tonumber(m2, 16)+f) % 0x100
m3 = (tonumber(m3, 16)+i) % 0x100