After upgrading net-snmp from 5.2.1.2-r1 to 5.4.2.1 command line parsing of the -LS switch doesn't work anymore. Reproducible: Always Steps to Reproduce: 1. Install net-analyzer/net-snmp-5.4.2.1 2. Start net-snmp as root via: /usr/sbin/snmpd -LS 0-4 d -Lf /dev/null Actual Results: Error message: invalid syslog facility: - Program aborts. Expected Results: snmpd being started logging LOG_EMERG (0) LOG_ALERT (1) LOG_CRIT (2) LOG_ERR (3) LOG_WARNING (4) to syslog facility daemon (d) and to no logfile at all (/dev/null). MAN-page says: -Ls FACILITY Log messages via syslog, using the specified facility (’d’ for LOG_DAEMON, ’u’ for LOG_USER, or ’0’-’7’ for LOG_LOCAL0 through LOG_LOCAL7). There are also "upper case" versions of each of these options, which allow the corresponding logging mechanism to be restricted to certain priorities of message. Using standard error logging as an example: -LE pri will log messages of priority ’pri’ and above to standard error. -LE p1-p2 will log messages with priority between ’p1’ and ’p2’ (inclusive) to standard error. For -LF and -LS the priority specification comes before the file or facility token. The priorities recognised are: 0 or ! for LOG_EMERG, 1 or a for LOG_ALERT, 2 or c for LOG_CRIT, 3 or e for LOG_ERR, 4 or w for LOG_WARNING, 5 or n for LOG_NOTICE, 6 or i for LOG_INFO, and 7 or d for LOG_DEBUG. Normal output is (or will be!) logged at a priority level of LOG_NOTICE
Thank you for report Marcel. This issue was fixed upstream so the following patch should be applied: http://net-snmp.svn.sourceforge.net/viewvc/net-snmp?view=rev&revision=17350
Please reopen if this is still an issue with 5.7.2_rc3.