Bug#296562: [seanius@haydn.debian.org: [Pkg-nagios-devel] nagios changelog,1.40,1.41 nagios-common.nagios.init,1.6,1.7]

sean finney sean finney <seanius@debian.org>, 296562@bugs.debian.org
Wed, 23 Feb 2005 20:27:55 -0500


--82I3+IH0IqGh5yIs
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

tags 296562 pending
thanks

tried to psychicly alter the the bts from my cvs changelog... heh.


	sean

----- Forwarded message from seanius@haydn.debian.org -----

=46rom: seanius@haydn.debian.org
To: pkg-nagios-devel@lists.alioth.debian.org
Subject: [Pkg-nagios-devel] nagios changelog,1.40,1.41 nagios-common.nagios=
=2Einit,1.6,1.7
Date: Wed, 23 Feb 2005 20:19:09 -0500 (EST)

Update of /cvsroot/pkg-nagios/nagios
In directory haydn:/org/alioth.debian.org/chroot/home/users/seanius/tmp/cvs=
-serv11275

Modified Files:
	changelog nagios-common.nagios.init=20
Log Message:
tags 296562 pending
thanks

made init script more robust for the db variants of nagios.

	sean



Index: changelog
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/pkg-nagios/nagios/changelog,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- changelog	23 Feb 2005 00:27:19 -0000	1.40
+++ changelog	24 Feb 2005 01:18:38 -0000	1.41
@@ -8,6 +8,11 @@
       Marcus Better <marcus@better.se> (closes: #296100, #296306).
     - nagios installs now include /var/log/nagios/archives, thanks
       to Heno Ivanov <heno@siil.net> (closes: #290003).
+    - check_nagios in the init script is a little more robust by
+      running both the check_nagios_db script *and* looking for the
+      pid.  thanks to Ryszard Lach <rla@debian.org> (closes: #296562).
+    - removed old, obsolete, probably unused support for check_netsaint.
+      if it breaks anything we can always add it back :)
=20
  -- Sean Finney <seanius@debian.org>  Mon, 21 Feb 2005 23:21:29 -0500
=20

Index: nagios-common.nagios.init
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/pkg-nagios/nagios/nagios-common.nagios.init,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- nagios-common.nagios.init	9 Feb 2005 04:48:21 -0000	1.6
+++ nagios-common.nagios.init	24 Feb 2005 01:18:38 -0000	1.7
@@ -30,37 +30,23 @@
 # start-stop-daemon should handle this work!
 #
 check_started () {
-    if [ -f /etc/nagios/check_nagios_db ]; then
- 	if /etc/nagios/check_nagios_db > /dev/null; then
- 	    return 0    # Is started
- 	else
- 	    return 1    # Isn't started
- 	fi
-    elif [ -f /usr/lib/nagios/plugins/check_nagios ]; then
-	if /usr/lib/nagios/plugins/check_nagios -e 15 -F /var/log/nagios/status.l=
og -C 'nagios' > /dev/null; then
-	    return 0    # Is started
-	else
-	    return 1    # Isn't started
+	if [ -f /etc/nagios/check_nagios_db ]; then
+		if ! /etc/nagios/check_nagios_db > /dev/null; then
+			return 1 	# isn't started
+		fi
 	fi
-    elif [ -f /usr/lib/netsaint/plugins/check_netsaint ]; then
-	if /usr/lib/netsaint/plugins/check_netsaint -F /var/log/nagios/status.log=
 -e 5 -C 'nagios' > /dev/null; then
-	    return 0    # Is started
-	else
-	    return 1    # Isn't started
+	if [ -f /usr/lib/nagios/plugins/check_nagios ]; then
+		if ! /usr/lib/nagios/plugins/check_nagios -e 15 -F /var/log/nagios/statu=
s.log -C 'nagios' > /dev/null; then
+			return 1    # isn't started
+		fi
 	fi
-    elif [ -f $PIDFILE ]; then
-    	# Try discovering if nagios is alive checking its pid
-	pid=3D`cat $PIDFILE`
-	if [ "$pid" ]; then
-		if ps $pid >/dev/null; then
+	if [ -f $PIDFILE ]; then
+		pid=3D`cat $PIDFILE`
+		if [ "$pid" ] && ps $pid >/dev/null; then
 			return 0    # Is started
 		fi
-	else
-	    return 1    # Isn't started
 	fi
-    else
-    	return 1	# Isn't started
-    fi
+	return 1	# Isn't started
 }
=20
 get_config () {


_______________________________________________
Pkg-nagios-devel mailing list
Pkg-nagios-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-nagios-devel


----- End forwarded message -----

--=20

--82I3+IH0IqGh5yIs
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFCHS2bynjLPm522B0RAt4HAJ9u6QoNOMRLB3xHni62JVwTAN1YWACfSMLJ
flTlGodWuJCzdoZ5u3bL0Mc=
=qJ3C
-----END PGP SIGNATURE-----

--82I3+IH0IqGh5yIs--