# cannot be used in SNMP configuration
Actual problem is a # character can't be used in any of the SNMP configuration fields. Original post follows.
Running 2.0-BETA4 (i386) built on Thu Oct 14 01:16:12 EDT 2010 FreeBSD 8.1-RELEASE-p1
Unsurprisingly, "bsnmpd" service always shows "stopped".
Don't know a lot about this config file's syntax, but on line 9, changing
system := 1 # pfSense
system := "1" # pfSense
at least allows bsnmpd to start. That fix doesn't make sense to me, but it works anyway. Deleting the comment also seems to do the trick. This might relate to the way bsnmpd parses its config file - if everything after a ":=" is copied verbatim and comments ignored...?
#4 Updated by Pierre POMES almost 9 years ago
The man page of bsnmp deals with '#' in config file:
VARIABLE ASSIGNMENTS Variable assignments can take one of two forms: variable := string variable ?= string The string reaches from the first non-blank character after the equal sign until the first new line or "#" character. In the first case the string is assigned to the variable unconditionally, in the second case the variable is only assigned if it does not exist yet.
So I suggest to replace all "#" by "_" when generating snmpd.conf. This could apply to system location, system contact, read community, and snmp trap string (ie : all strings in the screen).
Are you ok with this ?