-Coders,
I've been really pulling my hair out on this one. :(
Obviously there's a nasty bug in 5.1.2 snmptrapd that causes it to choke on comment lines in a config file if they're longer than the line before that comment, at least if they are at the very end. See yourself:
- --- snip --- foo$ /usr/sbin/snmptrapd --version
NET-SNMP Version: 5.1.2 Web: http://www.net-snmp.org/ Email: [EMAIL PROTECTED]
foo$ cat /tmp/snmptrapd.conf traphandle default /bin/true dontRetainLogs true # LINE_TOO_LONG_FOR_ME foo$ /usr/sbin/snmptrapd -f -Dread_config -C -c /tmp/snmptrapd.conf No log handling enabled - turning on stderr logging read_config: reading premib configuration tokens read_config: reading normal configuration tokens read_config: Reading optional config file: "/tmp/snmptrapd.conf" read_config: Reading configuration /tmp/snmptrapd.conf read_config: /tmp/snmptrapd.conf:1 examining: traphandle default /bin/true read_config: Found a parser. Calling it: traphandle / default /bin/true read_config:traphandle: registering handler for: default read_config: /tmp/snmptrapd.conf:2 examining: dontRetainLogs true read_config: Found a parser. Calling it: dontRetainLogs / true read_config: Optional File "_ME" does not exist. does not exist. : No such file or directory read_config: Optional File "es not exist. " does not exist. exist. " does not exist. : No such file or directory read_config: Optional File "not exist. " does not exist. exist. : No such file or directory Starting snmptrapd 5.1.2 - --- snap ---
If one replaces "# LINE_TOO_LONG_FOR_ME" by "# LINE_TOO_LONG", everything's fine. The length of the line before seems to be the limit. Weird. I got too tired to propose a fix. Any takers?
BTW, for some reason I couldn't reproduce this with snmpd itself. It's limited to snmptrapd in some way.
+Thomas
-- Thomas Anders (thomas.anders at blue-cable.de)
------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ Net-snmp-coders mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
