Revision f3df1d3e
Added by Steve Beaver over 5 years ago
src/etc/inc/system.inc | ||
---|---|---|
2417 | 2417 |
/* Try to guess from smbios strings */ |
2418 | 2418 |
unset($product); |
2419 | 2419 |
unset($maker); |
2420 |
unset($bios); |
|
2420 | 2421 |
$_gb = exec('/bin/kenv -q smbios.system.product 2>/dev/null', $product); |
2421 | 2422 |
$_gb = exec('/bin/kenv -q smbios.system.maker 2>/dev/null', $maker); |
2423 |
$_gb = exec('/bin/kenv -q smbios.bios.version 2>/dev/null', $bios); |
|
2424 |
|
|
2425 |
// AWS can only be identified via the bios version |
|
2426 |
if (stripos($bios[0], "amazon") !== false) { |
|
2427 |
return (array('name' => 'AWS', 'descr' => 'Amazon Web Services')); |
|
2428 |
} else if (stripos($bios[0], "Google") !== false) { |
|
2429 |
return (array('name' => 'Google', 'descr' => 'Google Cloud Compute')); |
|
2430 |
} |
|
2431 |
|
|
2422 | 2432 |
switch ($product[0]) { |
2423 | 2433 |
case 'FW7541': |
2424 | 2434 |
return (array('name' => 'FW7541', 'descr' => 'Netgate FW7541')); |
... | ... | |
2501 | 2511 |
break; |
2502 | 2512 |
case 'Virtual Machine': |
2503 | 2513 |
if ($maker[0] == "Microsoft Corporation") { |
2504 |
return (array('name' => 'Hyper-V', 'descr' => 'Hyper-V Virtual Machine'));
|
|
2514 |
return (array('name' => 'Microsfot', 'descr' => 'Microsoft Azure'));
|
|
2505 | 2515 |
} |
2506 | 2516 |
break; |
2507 | 2517 |
case 'VMware Virtual Platform': |
Also available in: Unified diff
Fixed #10621. Identify Amazon AWS instances