[Pkg-net-snmp-devel] Bug#429442: snmpd: init script should explicitly set PATH

Christian Hofstaedtler ch at nessus.at
Mon Jun 18 06:20:12 UTC 2007

Package: snmpd
Version: 5.2.3-7
Severity: normal

The current init script does not reset the PATH environment variable.
Therefore, it fails to find start-stop-daemon (and therefore fails to
work) from environments where PATH does not include "/sbin".
I found this problem when I added "/etc/init.d/snmpd restart" to the
crontab on this machine (to migitate a memory leak, but this is another

Proposed solution:

Add the following lines to the init script:
export PATH

Many other init scripts already do this:
host# grep ^PATH= /etc/init.d/* | wc -l

Thank you!

-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-4-xen-686
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages snmpd depends on:
ii  adduser                     3.102        Add and remove users and groups
ii  debconf                     1.5.11       Debian configuration management sy
ii  libc6                       2.3.6.ds1-13 GNU C Library: Shared libraries
ii  libsensors3                 1:2.10.1-3   library to read temperature/voltag
ii  libsnmp9                    5.2.3-7      NET SNMP (Simple Network Managemen
ii  libwrap0                    7.6.dbs-13   Wietse Venema's TCP wrappers libra

snmpd recommends no packages.

-- debconf information:
* snmpd/upgradefrom521:

More information about the Pkg-net-snmp-devel mailing list