[Pkg-nagios-changes] [pkg-nagios] r1968 - nagvis/trunk/debian

Alexander Reichle-Schmehl tolimar at alioth.debian.org
Mon Sep 26 13:24:36 UTC 2011


Author: tolimar
Date: 2011-09-26 13:24:35 +0000 (Mon, 26 Sep 2011)
New Revision: 1968

Added:
   nagvis/trunk/debian/templates
Modified:
   nagvis/trunk/debian/changelog
   nagvis/trunk/debian/config
   nagvis/trunk/debian/postinst
   nagvis/trunk/debian/postrm
Log:
Rework package configuration



Modified: nagvis/trunk/debian/changelog
===================================================================
--- nagvis/trunk/debian/changelog	2011-09-17 19:14:59 UTC (rev 1967)
+++ nagvis/trunk/debian/changelog	2011-09-26 13:24:35 UTC (rev 1968)
@@ -4,8 +4,9 @@
   * Update package description:  Now also works with Icinga
   * Change Package dependencies:  Drop all ndo and mysql related stuff, we want to use mk livestatus
   * Update debian/copyright
+  * Rework post{inst,rm} to not configure database
 
- -- Alexander Reichle-Schmehl <tolimar at debian.org>  Wed, 07 Sep 2011 16:59:51 +0200
+ -- Alexander Reichle-Schmehl <tolimar at debian.org>  Mon, 26 Sep 2011 15:23:50 +0200
 
 nagvis (1:1.4.6-2) unstable; urgency=medium
 

Modified: nagvis/trunk/debian/config
===================================================================
--- nagvis/trunk/debian/config	2011-09-17 19:14:59 UTC (rev 1967)
+++ nagvis/trunk/debian/config	2011-09-26 13:24:35 UTC (rev 1968)
@@ -3,19 +3,7 @@
 
 . /usr/share/debconf/confmodule
 
-tmp=`mktemp`
+db_input high nagvis/monitoring_system || true
+db_go || true
 
-if [ -f /etc/dbconfig-common/ndoutils-mysql.conf ] ; then
-	dbconfig-load-include -f sh \
-		-udbc_dbuser -pdbc_dbpass -ddbc_dbname -sdbc_dbserver -Pdbc_dbport \
-		/etc/dbconfig-common/ndoutils-mysql.conf > $tmp
-	. $tmp
-	if [ -f /usr/share/dbconfig-common/dpkg/frontend.config.mysql ]; then
-		. /usr/share/dbconfig-common/dpkg/frontend.config.mysql
-		dbc_go nagvis $@
-	fi
-	db_stop
-fi
 
-rm -f $tmp
-

Modified: nagvis/trunk/debian/postinst
===================================================================
--- nagvis/trunk/debian/postinst	2011-09-17 19:14:59 UTC (rev 1967)
+++ nagvis/trunk/debian/postinst	2011-09-26 13:24:35 UTC (rev 1968)
@@ -6,13 +6,6 @@
 set -e
 
 . /usr/share/debconf/confmodule
-if [ -f /usr/share/dbconfig-common/dpkg/frontend.postinst.mysql ]; then
-	. /usr/share/dbconfig-common/dpkg/frontend.postinst.mysql
-	dbc_generate_include='template:/etc/nagvis/nagvis.ini.php'
-	dbc_generate_include_owner='www-data:www-data'
-	dbc_generate_include_args='--ucf -C\; -o template_infile=/usr/share/nagvis/debian/nagvis.ini.php-sample'
-	dbc_go nagvis $@
-fi
 
 # summary of how this script can be called:
 #        * <postinst> `configure' <most-recently-configured-version>
@@ -58,6 +51,9 @@
 	#	ln -s /etc/nagvis/apache.conf /etc/apache2/conf.d/nagvis.conf
 	#fi
 
+	monitoring=$(db_get nagvis/monitoring_system)
+	echo "Will configure nagvis to use $monitoring"
+
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)

Modified: nagvis/trunk/debian/postrm
===================================================================
--- nagvis/trunk/debian/postrm	2011-09-17 19:14:59 UTC (rev 1967)
+++ nagvis/trunk/debian/postrm	2011-09-26 13:24:35 UTC (rev 1968)
@@ -5,54 +5,24 @@
 
 set -e
 
-if [ -f /usr/share/debconf/confmodule ]; then
-	. /usr/share/debconf/confmodule
-fi
-
-if [ -f /usr/share/dbconfig-common/dpkg/postrm.mysql ]; then
-	. /usr/share/dbconfig-common/dpkg/frontend.postrm.mysql
-	dbc_go nagvis $@
-fi
-
-# summary of how this script can be called:
-#        * <postrm> `remove'
-#        * <postrm> `purge'
-#        * <old-postrm> `upgrade' <new-version>
-#        * <new-postrm> `failed-upgrade' <old-version>
-#        * <new-postrm> `abort-install'
-#        * <new-postrm> `abort-install' <old-version>
-#        * <new-postrm> `abort-upgrade' <old-version>
-#        * <disappearer's-postrm> `disappear' <overwriter>
-#          <overwriter-version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-
 case "$1" in
-    purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
-    ;;
-
-    *)
-        echo "postrm called with unknown argument \`$1'" >&2
-        exit 1
-    ;;
-esac
-
-if [ "$1" = "purge" ]; then
+    purge)
 	for file in apache.conf nagvis.ini.php; do
 		rm -f /etc/nagvis/$file
 		if [ -x /usr/bin/ucf ] ; then
 			ucf --debconf-ok --purge /etc/nagvis/$file
 		fi
 	done
-
-	#if [ -e /etc/apache2/conf.d/nagvis.conf ]; then
-	#	rm -f /etc/apache2/conf.d/nagvis.conf
-	#fi
-
 	rm -rf /var/cache/nagvis
-fi
-	
+    ;;
+    remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+    ;;
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
 # dh_installdeb will replace this with shell code automatically
 # generated by other debhelper scripts.
 

Added: nagvis/trunk/debian/templates
===================================================================
--- nagvis/trunk/debian/templates	                        (rev 0)
+++ nagvis/trunk/debian/templates	2011-09-26 13:24:35 UTC (rev 1968)
@@ -0,0 +1,13 @@
+Template: nagvis/monitoring_system
+Type: select
+Default: icinga
+Choices: icinga, nagios, other
+Description: For which monitoring suite should NagVis be configured?
+ This NagVis package supports the monitoring suites Icinga as well as
+ well as Nagios out of the box.  Choose them, if you have them locally
+ installed and would like to use check-mk-livestatus.
+ .
+ If you would like to use NagVis with a different backend or a different
+ monitoring suite, please choose "other".  You'll have to configure it
+ manually.
+




More information about the Pkg-nagios-changes mailing list