lua-platform-info: x86: return CPU model

This commit is contained in:
Matthias Schiffer 2015-01-25 04:16:58 +01:00
parent 69d9a419a0
commit 29add3169b
1 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,13 @@
local model
for line in io.lines('/proc/cpuinfo') do
model = line:match('^model name%s*:%s*(.+)$')
if model then
break
end
end
module 'platform_info'
@ -18,7 +28,7 @@ end
-- The model name
function get_model()
return nil
return model
end
-- The image name for sysupgrades