Package: snmpd
Version: 5.7.3+dfsg-5+deb10u2

When starting snmpd on a non-systemd machine the init script

  /etc/init.d/snmpd

fails to source the file

  /etc/default/snmpd

which results in SNMPDOPTS specified in the default file
being ignored:

  % grep ^SNMPDOPTS /etc/default/snmpd
SNMPDOPTS='-Lf /dev/null -u Debian-snmp -g Debian-snmp -I -smux,mteTrigger,mteTriggerConf -p /run/snmpd.pid'

  % service snmpd restart
  [ ok ] Restarting SNMP Services: snmpd.

  % ps auxf|grep snmpd
Debian-+ 3480 0.0 0.0 33872 8344 ? S 12:28 0:00 /usr/sbin/snmpd -Lsd -Lf /dev/null -u Debian-snmp -g Debian-snmp -I -smux mteTrigger mteTriggerConf -p /run/snmpd.pid

Please note the parameter "-Lsd" to snmpd in the process list
which is not present in SNMPDOPTS in /etc/default/snmpd.

Snippet from the init script:

DEFAULT_SNMPDOPTS="-Lsd -Lf /dev/null -u Debian-snmp -g Debian-snmp -I -smux,mteTrigger,mteTriggerConf"
  [ -z "$SNMPDOPTS" ] && SNMPDOPTS=$DEFAULT_SNMPDOPTS

It checks $SNMPDOPTS which isn't defined because the defaults file wasn't sourced.

The init script from snmpd from stretch has these lines:

  # Reads config file (will override defaults above)
  [ -r /etc/default/snmpd ] && . /etc/default/snmpd

After updating snmpd from stretch to buster the default file is being ignored.

This affects

  buster (oldstable) snmpd-5.7.3+dfsg-5+deb10u2
  bullseye  (stable) snmpd-5.9+dfsg-3+b1

Reply via email to