summaryrefslogtreecommitdiffstats
path: root/etc/inc/pfsense-utils.inc
diff options
context:
space:
mode:
authorWarren Baker <warren@decoy.co.za>2013-04-26 10:35:06 +0200
committerWarren Baker <warren@decoy.co.za>2013-04-26 10:35:06 +0200
commit58897b8cc200def6192345a3fe3058fb7ebc9cb5 (patch)
treeaa432713d4322b21f349985179c88afb042e24de /etc/inc/pfsense-utils.inc
parent187250859872e06d3144d041ee577421039fbb5d (diff)
downloadpfsense-58897b8cc200def6192345a3fe3058fb7ebc9cb5.zip
pfsense-58897b8cc200def6192345a3fe3058fb7ebc9cb5.tar.gz
Fix isvm check to match on product
Diffstat (limited to 'etc/inc/pfsense-utils.inc')
-rw-r--r--etc/inc/pfsense-utils.inc11
1 files changed, 6 insertions, 5 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 7c53885..11bc42d 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -1598,11 +1598,12 @@ function load_thermal_hardware() {
******/
function isvm() {
$virtualenvs = array("vmware", "parallels", "qemu", "bochs", "plex86");
- $bios_vendor = strtolower(`/bin/kenv | /usr/bin/awk -F= '/smbios.bios.vendor/ {print $2}'`);
- if(in_array($bios_vendor, $virtualenvs))
- return true;
- else
- return false;
+ $bios_product = trim(`/bin/kenv | /usr/bin/awk -F= '/smbios.system.product/ {print $2}'`);
+ foreach ($virtualenvs as $virtualenv)
+ if (stripos($bios_product, $virtualenv) !== false)
+ return true;
+
+ return false;
}
function get_freebsd_version() {
OpenPOWER on IntegriCloud