[Pkg-nagios-devel] Bug#631550: nsca: init script should set PATH or qualify paths

Michael Stroucken stroucki at andrew.cmu.edu
Fri Jun 24 19:42:07 UTC 2011


Package: nsca
Version: 2.7.2+nmu2
Severity: normal

*** Please type your report below this line ***

While working on a workaround for bug 631447, I put the following in crontab:-

30 15 * * * (/etc/init.d/nsca stop;/usr/bin/killall nsca;/etc/init.d/nsca start) >/tmp/scheis 2>&1

I waited for it to run and checked to see if nsca had restarted:-
monitor:~# date
Fri Jun 24 15:30:16 EDT 2011
monitor:~# ps auxw|grep nsc
root      5445  0.0  0.0   7544   824 pts/0    S+   15:30   0:00 grep nsc
monitor:~# more /tmp/scheis
Stopping Nagios Service Check Acceptor: /etc/init.d/nsca: line 67: start-stop-da
emon: command not found
ERROR: could not stop nsca.
Starting Nagios Service Check Acceptor: /etc/init.d/nsca: line 62: start-stop-da
emon: command not found
ERROR: could not start nsca.
monitor:~# which start-stop-daemon
/sbin/start-stop-daemon

Other init scripts explicitly set PATH to cover the programs used within the script, like syslog-ng:-
PATH=/sbin:/bin:/usr/sbin:/usr/bin

nsca should too, or fully qualify programs with their directory.

Greetings,
Michael.

-- System Information:
Debian Release: 6.0.1
   APT prefers stable
   APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-xen-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages nsca depends on:
ii  debconf [debconf-2.0]         1.5.36.1   Debian configuration management sy
ii  libc6                         2.11.2-10  Embedded GNU C Library: Shared lib
ii  libmcrypt4                    2.5.8-3.1  De-/Encryption Library

nsca recommends no packages.

Versions of packages nsca suggests:
ii  nagios-plugins                1.4.15-3   Plugins for the nagios network mon
ii  nagios-plugins-basic          1.4.15-3   Plugins for the nagios network mon
ii  nagios3                       3.2.1-2    A host/service/network monitoring

-- Configuration Files:
/etc/nsca.cfg changed [not included]
/etc/send_nsca.cfg changed [not included]

-- debconf information excluded





More information about the Pkg-nagios-devel mailing list