Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 250422 - net-analyzer/net-snmp: Command line parsing in net-snmp- is broken: "-LS 0-4 d" doesn't work anymore
Summary: net-analyzer/net-snmp: Command line parsing in net-snmp- is broken: "-...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Netmon Herd
Depends on:
Reported: 2008-12-09 18:57 UTC by Marcel Meckel
Modified: 2012-10-04 16:02 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Marcel Meckel 2008-12-09 18:57:17 UTC
After upgrading net-snmp from to command line parsing of the -LS switch doesn't work anymore.

Reproducible: Always

Steps to Reproduce:
1. Install net-analyzer/net-snmp-
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)

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
Comment 1 Peter Volkov (RETIRED) gentoo-dev 2009-03-02 11:29:58 UTC
Thank you for report Marcel. This issue was fixed upstream so the following patch should be applied:
Comment 2 Diego Elio Pettenò (RETIRED) gentoo-dev 2012-10-04 16:02:41 UTC
Please reopen if this is still an issue with 5.7.2_rc3.