lua-platform-info: remove hypervisor-dependent image name logic
This commit is contained in:
parent
d9b982d5df
commit
2d0f8b38db
|
@ -8,26 +8,8 @@ for line in io.lines('/proc/cpuinfo') do
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local image_name = 'x86-generic'
|
|
||||||
|
|
||||||
local f = io.open('/sys/class/dmi/id/sys_vendor')
|
|
||||||
if f then
|
|
||||||
local vendor = f:read('*line')
|
|
||||||
f:close()
|
|
||||||
|
|
||||||
if vendor then
|
|
||||||
if vendor:match('^VMware') or vendor:match('^VMW') then
|
|
||||||
image_name = 'x86-vmware'
|
|
||||||
elseif vendor:match('^innotek GmbH') then
|
|
||||||
image_name = 'x86-virtualbox'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
module 'platform_info'
|
module 'platform_info'
|
||||||
|
|
||||||
|
|
||||||
-- The OpenWrt target
|
-- The OpenWrt target
|
||||||
function get_target()
|
function get_target()
|
||||||
return 'x86'
|
return 'x86'
|
||||||
|
@ -50,5 +32,5 @@ end
|
||||||
|
|
||||||
-- The image name for sysupgrades
|
-- The image name for sysupgrades
|
||||||
function get_image_name()
|
function get_image_name()
|
||||||
return image_name
|
return 'x86-generic'
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue