Implements per-MAC RRDs (backend)

This commit is contained in:
Simone Mainardi 2017-10-04 16:30:38 +02:00
parent c54b2523a1
commit e6da58e567
3 changed files with 30 additions and 6 deletions

View file

@ -2115,10 +2115,10 @@ function getPathFromMac(addr)
local manufacturer = {mac[1], mac[2], mac[3]}
local nic = {mac[4], mac[5], mac[6]}
-- manufacturers go in a hierarchical structure
local res = table.concat(manufacturer, "/")
-- each manufacturer has its own directory
local res = table.concat(manufacturer, "_")
-- the nic identifier goes as-is because it is non structured
res = fixPath(res.."/"..table.concat(nic, "_"))
res = fixPath(res.."/"..table.concat(nic, "/"))
-- finally the vlan
res = res..vlan