Re: [Nagios-devel] Init script issue

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] Init script issue

Post by Guest »

Thanks! Will be in CVS shortly.

On 3 Sep 2002 at 14:03, Russell Scibetti wrote:

> There is a problem with the Nagios init script. A little while back,
> Paul (the other person working on Nagios here) noticed that the killproc
> function in the init script never ran because there is a killrpoc
> function included in the /etc/(rc.d)/init.d/functions that the script
> inherits. This was later fixed by changing the name of the function to
> killproc_nagios (as it is now in 1.0b5).
>
> However, the same problem exists (at least in RedHat) when you try to do
> /etc/init.d/nagios status. status is also an inherited function, so the
> status function that is written in the init.d script nevers runs. You
> will get a status output, but not the right one. If you are getting a
> message like:
>
> nagios (pid 111 222 333.....) is running
>
> then the wrong status function is being called. The real output should
> be a one line ps result (ps -p $NagiosPID if you look in the script).
>
> You can fix this one of two ways. The quickest is to change any
> reference to "status" to "status_nagios" the same way the killproc
> problem was fixed. The other way is to remove or comment out this
> section of the script:
>
> if [ -f /etc/rc.d/init.d/functions ]; then
> . /etc/rc.d/init.d/functions
> elif [ -f /etc/init.d/functions ]; then
> . /etc/init.d/functions
> fi
>
> This will make sure any function called will run the actual function in
> the init script, not the built-in Linux function. There seems to be no
> problem with commenting out these lines (I'm running the script just
> fine). So unless someone can tell me when these are necessary, you can
> remove them and the script will work as it should.
>
> -Russell Scibetti
>
> --
> Russell Scibetti
> Quadrix Solutions, Inc.
> http://www.quadrix.com
> (732) 235-2335, ext. 7038
>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by: OSDN - Tired of that same old
> cell phone? Get a new here for FREE!
> https://www.inphonic.com/r.asp?r=source ... de1=vs3390
> _______________________________________________
> Nagios-devel mailing list
> Nagios-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/lis ... gios-devel
>



Ethan Galstad,
Nagios Developer
---
Email: nagios@nagios.org
Website: http://www.nagios.org






This post was automatically imported from historical nagios-devel mailing list archives
Original poster: nagios@nagios.org
Locked