Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 22498 - nsca has broken init script
Summary: nsca has broken init script
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High major
Assignee: Dean Bailey
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-09 11:35 UTC by Pedro Venda
Modified: 2003-06-17 17:10 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pedro Venda 2003-06-09 11:35:43 UTC
after seing the bug report #19539 (about a broken nrpe init script) i found out
that nagios-nsca has the same problem.

the fix has the same form as the nrpe init script:

nearly quoting bug report #19539:

The init script needs to look like this to work:

start() {
        ebegin "Starting nsca"
        start-stop-daemon --start --quiet --name nsca \
        --startas /usr/nagios/bin/nsca \
                -- -c /etc/nagios/nsca.cfg --daemon
        eend $? "Failed to Start nsca"
}


instead of

start() {
        ebegin "Starting nsca"
        start-stop-daemon --start --quiet --name nsca \
        --startas /usr/nagios/bin/nsca \
                -c nagios:nagios \
                -- -d /etc/nagios/nsca.cfg
        eend $? "Failed to Start nsca"
}

Reproducible: Always
Steps to Reproduce:
# /usr/nagios/bin/nsca --help

NSCA - Nagios Service Check Acceptor
Copyright (c) 2000-2003 Ethan Galstad (nagios@nagios.org)
Version: 2.3
Last Modified: 01-26-2003
License: GPL
Encryption Routines: AVAILABLE

Usage: /usr/nagios/bin/nsca -c <config_file> [mode]

Options:
 <config_file> = Name of config file to use
 [mode]        = Determines how NSCA should run. Valid modes:
   --inetd     = Run as a service under inetd or xinetd
   --daemon    = Run as a standalone multi-process daemon
   --single    = Run as a standalone single-process daemon (default)

Notes:
This program is designed to accept passive check results from
remote hosts that use the send_nsca utility.  Can run as a service
under inetd or xinetd (read the docs for info on this), or as a
standalone daemon.

# /etc/init.d/nsca start

Actual Results:  
# /etc/init.d/nsca start
 * Starting nsca...
Incorrect command line arguments supplied

NSCA - Nagios Service Check Acceptor
Copyright (c) 2000-2003 Ethan Galstad (nagios@nagios.org)
Version: 2.3
Last Modified: 01-26-2003
License: GPL
Encryption Routines: AVAILABLE

Usage: /usr/nagios/bin/nsca -c <config_file> [mode]

Options:
 <config_file> = Name of config file to use
 [mode]        = Determines how NSCA should run. Valid modes:
   --inetd     = Run as a service under inetd or xinetd
   --daemon    = Run as a standalone multi-process daemon
   --single    = Run as a standalone single-process daemon (default)

Notes:
This program is designed to accept passive check results from
remote hosts that use the send_nsca utility.  Can run as a service
under inetd or xinetd (read the docs for info on this), or as a
standalone daemon.

 * Failed to Start nsca                                                   [ !! ]



Expected Results:  
# /etc/init.d/nsca start
 * Starting nsca...                                                       [ ok ]
Comment 1 Dean Bailey 2003-06-17 17:10:41 UTC
Fix going into portage in a few minutes.