2016-09-05 21:43:17 -05:00
|
|
|
local dat = {}
|
2022-06-25 04:57:24 +10:00
|
|
|
|
2016-09-05 21:43:17 -05:00
|
|
|
local ver, info
|
2022-06-25 04:57:24 +10:00
|
|
|
local datread = require('data/load_dat')
|
|
|
|
|
datread, ver = datread.open('sysinfo.dat', '# This file was generated on')
|
2016-09-05 21:43:17 -05:00
|
|
|
|
|
|
|
|
function dat.check(set, softlist)
|
|
|
|
|
if softlist or not datread then
|
|
|
|
|
return nil
|
|
|
|
|
end
|
|
|
|
|
local status
|
2022-06-25 04:57:24 +10:00
|
|
|
status, info = pcall(datread, 'bio', 'info', set)
|
2016-09-05 21:43:17 -05:00
|
|
|
if not status or not info then
|
|
|
|
|
return nil
|
|
|
|
|
end
|
2022-06-25 04:57:24 +10:00
|
|
|
return _p('plugin-data', 'Sysinfo')
|
2016-09-05 21:43:17 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function dat.get()
|
|
|
|
|
return info
|
|
|
|
|
end
|
|
|
|
|
|
2016-09-06 22:11:01 -05:00
|
|
|
function dat.ver()
|
|
|
|
|
return ver
|
|
|
|
|
end
|
|
|
|
|
|
2016-09-05 21:43:17 -05:00
|
|
|
return dat
|