simple patch for daemon-init.in
Joseph Blaylock
blaylock at indiana.edu
Tue Mar 16 22:52:13 CET 2004
I found it confusing initially when I went to install Nagios and found that
the init script didn't output anything. Of course, this was because I
hadn't written a configuration file yet, but I didn't know that. I expected
that it would print usage information, like most of the other init scripts
on my system. Reading the script, I found the two test || die lines and
realized that it was supposed to do that.
I think it might be good to be more informative, though, so I tweaked it a
little:
--- daemon-init.in.new Tue Mar 16 16:31:17 2004
+++ daemon-init.in Sat Nov 22 20:36:03 2003
@@ -94,16 +94,10 @@
# Check that nagios exists.
-if [ ! -f $NagiosBin ]; then
- echo "Executable file $NagiosBin not found. Exiting."
- exit 1
-fi
+test -f $NagiosBin || exit 0
# Check that nagios.cfg exists.
-if [ ! -f #NagiosCfg ]; then
- echo "Configuration file $NagiosCfg not found. Exiting."
- exit 1
-fi
+test -f $NagiosCfg || exit 0
# See how we were called.
case "$1" in
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
More information about the Developers
mailing list