mirror of https://github.com/aredn/aredn.git
Collapse QEMU and VMWARE hardware into two basic types (#1091)
This commit is contained in:
parent
9e94c018c7
commit
62a6959378
|
@ -1203,10 +1203,10 @@
|
|||
"beamwidth": 6
|
||||
}
|
||||
},
|
||||
"qemu standard pc (i440fx + piix, 1996)": {
|
||||
"qemu": {
|
||||
"name": "QEMU PC"
|
||||
},
|
||||
"vmware, inc. vmware virtual platform": {
|
||||
"vmware": {
|
||||
"name": "VMware PC"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,6 +52,14 @@ function hardware.get_board()
|
|||
end
|
||||
board_json = json.parse(f:read("*a"))
|
||||
f:close()
|
||||
-- Collapse virtualized hardware into the two basic types
|
||||
if board_json.model.id:match("^qemu%-") then
|
||||
board_json.model.id = "qemu"
|
||||
board_json.model.name = "QEMU"
|
||||
elseif board_json.model.id:lower():match("^vmware") then
|
||||
board_json.model.id = "vmware"
|
||||
board_json.model.name = "VMware"
|
||||
end
|
||||
end
|
||||
return board_json
|
||||
end
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local board = aredn.hardware.get_board_type()
|
||||
if board == "mikrotik,hap-ac2" or board == "mikrotik,hap-ac3" or board == "qemu-standard-pc-i440fx-piix-1996" or board == "glinet,gl-b1300" or board == "VMware, Inc. VMware Virtual Platform" then
|
||||
if board == "mikrotik,hap-ac2" or board == "mikrotik,hap-ac3" or board == "qemu" or board == "glinet,gl-b1300" or board == "vmware" then
|
||||
return { href = "advancednetwork", display = "Advanced Network" }
|
||||
end
|
||||
|
|
|
@ -287,7 +287,7 @@ if parms.button_refresh_fw then
|
|||
firmware_versions[ver] = nil
|
||||
for _, profile in ipairs(info.profiles)
|
||||
do
|
||||
if profile.id == board_type or ((board_type == "qemu-standard-pc-i440fx-piix-1996" or board_type == "VMware, Inc. VMware Virtual Platform") and profile.id == "generic" and profile.target == "x86/64") then
|
||||
if profile.id == board_type or ((board_type == "qemu" or board_type == "vmware") and profile.id == "generic" and profile.target == "x86/64") then
|
||||
firmware_list[ver] = {
|
||||
overview = config_serverpath .. data .. "/" .. profile.target .. "/" .. profile.id .. ".json",
|
||||
target = info.image_url:gsub("{target}", profile.target)
|
||||
|
|
|
@ -61,8 +61,8 @@ local layouts = {
|
|||
["mikrotik,hap-ac2"] = default_5_port_layout,
|
||||
["mikrotik,hap-ac3"] = default_5_port_layout,
|
||||
["glinet,gl-b1300"] = default_3_port_layout,
|
||||
["qemu-standard-pc-i440fx-piix-1996"] = default_n_port_layout,
|
||||
["VMware, Inc. VMware Virtual Platform"] = default_n_port_layout
|
||||
["qemu"] = default_n_port_layout,
|
||||
["vmware"] = default_n_port_layout
|
||||
}
|
||||
|
||||
local default_5_port_config = {
|
||||
|
@ -129,8 +129,8 @@ local default_configs = {
|
|||
["mikrotik,hap-ac2"] = default_5_port_config,
|
||||
["mikrotik,hap-ac3"] = default_5_port_config,
|
||||
["glinet,gl-b1300"] = default_3_port_config,
|
||||
["qemu-standard-pc-i440fx-piix-1996"] = default_1_port_config,
|
||||
["VMware, Inc. VMware Virtual Platform"] = default_1_port_config
|
||||
["qemu"] = default_1_port_config,
|
||||
["vmware"] = default_1_port_config
|
||||
}
|
||||
|
||||
function read_user_config(network)
|
||||
|
|
Loading…
Reference in New Issue