[Pkg-nagios-changes] [pkg-nagios] r690 - nagios2/trunk/debian

Sean Finney seanius at costa.debian.org
Fri Feb 3 15:36:16 UTC 2006


Author: seanius
Date: 2006-02-03 15:36:15 +0000 (Fri, 03 Feb 2006)
New Revision: 690

Added:
   nagios2/trunk/debian/nagios2.prerm
Modified:
   nagios2/trunk/debian/changelog
Log:
conditionally stop init script in nagios2 prerm

Modified: nagios2/trunk/debian/changelog
===================================================================
--- nagios2/trunk/debian/changelog	2006-01-31 21:09:14 UTC (rev 689)
+++ nagios2/trunk/debian/changelog	2006-02-03 15:36:15 UTC (rev 690)
@@ -8,6 +8,9 @@
   * fix in the determining $servers in postinst.
   * the directory removals in the postrm have been updated to reflect
     the nagios2 directory layout.
+  * conditionally stop the nagios2 daemon in the nagios2 packages' prerm,
+    for cases where it is being purged before nagios2-common's prerm
+    does so (the latter will not stop it otherwise).
 
  -- Marc Haber <mh+debian-packages at zugschlus.de>  Mon, 23 Jan 2006 19:11:32 +0000
 

Added: nagios2/trunk/debian/nagios2.prerm
===================================================================
--- nagios2/trunk/debian/nagios2.prerm	2006-01-31 21:09:14 UTC (rev 689)
+++ nagios2/trunk/debian/nagios2.prerm	2006-02-03 15:36:15 UTC (rev 690)
@@ -0,0 +1,16 @@
+#!/bin/sh -e
+
+# we attempt to stop nagios2 twice, once in nagios2-common's prerm
+# and once here.  otherwise, if nagios2+nagios2-common are being purged,
+# the /usr/sbin/nagios2 binary could disappear before nagios2-common's
+# prerm script runs, which would prevent it from being able to stop
+# the binary.
+if [ -x "/etc/init.d/nagios2" ]; then
+	if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
+		invoke-rc.d nagios2 stop || exit 0
+	else
+		/etc/init.d/nagios2 stop || exit 0
+	fi
+fi
+
+#DEBHELPER#




More information about the Pkg-nagios-changes mailing list