diff options
Diffstat (limited to 'src/etc/inc/system.inc')
-rw-r--r-- | src/etc/inc/system.inc | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/etc/inc/system.inc b/src/etc/inc/system.inc index dc8f902..6b7d19f 100644 --- a/src/etc/inc/system.inc +++ b/src/etc/inc/system.inc @@ -2170,9 +2170,11 @@ function system_identify_specific_platform() { $hw_model = get_single_sysctl('hw.model'); /* Try to guess from smbios strings */ - unset($output); - $_gb = exec('/bin/kenv smbios.system.product 2>/dev/null', $output); - switch ($output[0]) { + unset($product); + unset($maker); + $_gb = exec('/bin/kenv smbios.system.product 2>/dev/null', $product); + $_gb = exec('/bin/kenv smbios.system.maker 2>/dev/null', $maker); + switch ($product[0]) { case 'FW7541': return (array('name' => 'FW7541', 'descr' => 'Netgate FW7541')); break; @@ -2212,6 +2214,11 @@ function system_identify_specific_platform() { case 'SYS-5018D-FN4T': return (array('name' => 'XG-1540', 'descr' => 'Super Micro XG-1540')); break; + case 'Virtual Machine': + if ($maker[0] == "Microsoft Corporation") { + return (array('name' => 'Hyper-V', 'descr' => 'Hyper-V Virtual Machine')); + } + break; } /* the rest of the code only deals with 'embedded' platforms */ |