diff options
author | John Fleming <strgout@pfsense.org> | 2005-07-13 02:24:17 +0000 |
---|---|---|
committer | John Fleming <strgout@pfsense.org> | 2005-07-13 02:24:17 +0000 |
commit | 03ba7a0f215acf379548b16f7de778a6a6e315e8 (patch) | |
tree | c53603f6f13b3101609ea319e15759fd561f9324 /etc | |
parent | 14f9c43ff30559f355651fc9b05e915b43daa35e (diff) | |
download | pfsense-03ba7a0f215acf379548b16f7de778a6a6e315e8.zip pfsense-03ba7a0f215acf379548b16f7de778a6a6e315e8.tar.gz |
1. Fix snmp.
2. ???
3. Profit!
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/services.inc | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/etc/inc/services.inc b/etc/inc/services.inc index c6dd95a..5ec6e1e 100644 --- a/etc/inc/services.inc +++ b/etc/inc/services.inc @@ -484,23 +484,56 @@ EOD; $snmpdconf .= <<<EOD begemotSnmpdCommunityDisable = 1 -begemotSnmpdPortStatus.0.0.0.0.161 = 1 + +EOD; + + if(is_port( $config['snmpd']['pollport'] )) { + $snmpdconf .= <<<EOD +begemotSnmpdPortStatus.0.0.0.0.{$config['snmpd']['pollport']} = 1 + +EOD; + + } + + $snmpdconf .= <<<EOD begemotSnmpdLocalPortStatus."/var/run/snmpd.sock" = 1 begemotSnmpdLocalPortType."/var/run/snmpd.sock" = 4 +# These are bsnmp macros not php vars. sysContact = $(contact) sysLocation = $(location) sysObjectId = 1.3.6.1.4.1.12325.1.1.2.1.$(system) snmpEnableAuthenTraps = 2 + +EOD; + + if (is_array( $config['snmpd']['modules'] )) { + if(isset($config['snmpd']['modules']['mibii'])) { + $snmpdconf .= <<<EOD begemotSnmpdModulePath."mibII" = "/usr/lib/snmp_mibII.so" + +EOD; + } + + if(isset($config['snmpd']['modules']['netgraph'])) { + $snmpdconf .= <<<EOD begemotSnmpdModulePath."netgraph" = "/usr/lib/snmp_netgraph.so" %netgraph begemotNgControlNodeName = "snmpd" + +EOD; + } + + if(isset($config['snmpd']['modules']['pf'])) { + $snmpdconf .= <<<EOD begemotSnmpdModulePath."pf" = "/usr/lib/snmp_pf.so" # config must end with blank line + EOD; + } + } fwrite($fd, $snmpdconf); fclose($fd); @@ -633,4 +666,4 @@ EOD; return 0; } -?>
\ No newline at end of file +?> |