summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/services_snmp.php
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2017-01-07 18:57:06 -0500
committerjim-p <jimp@pfsense.org>2017-01-07 18:57:06 -0500
commit43de83978ed93c9a4886e2844e341af0f3fe9a05 (patch)
tree8ebe76e2eba00513ff7acffe66d6eeb4596dc5c5 /src/usr/local/www/services_snmp.php
parent9a54824095c4b809326e5326877c20d40cb07fab (diff)
downloadpfsense-43de83978ed93c9a4886e2844e341af0f3fe9a05.zip
pfsense-43de83978ed93c9a4886e2844e341af0f3fe9a05.tar.gz
Don't allow SNMP hostres module to be selected or used with VMware VMs that have a CD/DVD Drive device. Fixes #6882
Diffstat (limited to 'src/usr/local/www/services_snmp.php')
-rw-r--r--src/usr/local/www/services_snmp.php24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/usr/local/www/services_snmp.php b/src/usr/local/www/services_snmp.php
index 66caf4f..e138300 100644
--- a/src/usr/local/www/services_snmp.php
+++ b/src/usr/local/www/services_snmp.php
@@ -33,6 +33,8 @@
require_once("guiconfig.inc");
require_once("functions.inc");
+$specplatform = system_identify_specific_platform();
+
if (!is_array($config['snmpd'])) {
$config['snmpd'] = array();
$config['snmpd']['rocommunity'] = "public";
@@ -316,12 +318,14 @@ $group->add(new Form_MultiCheckbox(
$pconfig['pf']
));
-$group->add(new Form_MultiCheckbox(
- 'hostres',
- null,
- 'Host Resources',
- $pconfig['hostres']
-));
+if (!(($specplatform['name'] == 'VMware') && (file_exists('/dev/cd0')))) {
+ $group->add(new Form_MultiCheckbox(
+ 'hostres',
+ null,
+ 'Host Resources',
+ $pconfig['hostres']
+ ));
+}
$group->add(new Form_MultiCheckbox(
'ucd',
@@ -338,6 +342,14 @@ $group->add(new Form_MultiCheckbox(
));
$section->add($group);
+if ((($specplatform['name'] == 'VMware') && (file_exists('/dev/cd0')))) {
+ $section->addInput(new Form_StaticText(
+ NULL,
+ NULL
+ ))->setHelp(sprint_info_box('The hostres module is not compatible with VMware virtual ' .
+ 'machines configured with a virtual CD/DVD Drive.', 'warning', false));
+}
+
$form->add($section);
$section = new Form_Section('Interface Binding');
OpenPOWER on IntegriCloud