diff options
author | Chris Buechler <cmb@pfsense.org> | 2016-04-23 02:52:09 -0500 |
---|---|---|
committer | Chris Buechler <cmb@pfsense.org> | 2016-04-23 02:52:09 -0500 |
commit | df5c2c73cee730192fa05fd31d270172f70baa91 (patch) | |
tree | c980b949bf0f67febb020d90e88b7efa2c4ec5df /src/etc | |
parent | fe86a6630336536fe8d49047793868516711d960 (diff) | |
download | pfsense-df5c2c73cee730192fa05fd31d270172f70baa91.zip pfsense-df5c2c73cee730192fa05fd31d270172f70baa91.tar.gz |
Add Hyper-V support to system_identify_specific_platform, and disable S.M.A.R.T. actions in Hyper-V guests. Ticket #6147
Diffstat (limited to 'src/etc')
-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 */ |