summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 17f1527)
raw | patch | inline | side by side (parent: 17f1527)
author | tolimar <tolimar@98d490a6-b407-0410-aaaa-fdee166ba3f5> | |
Mon, 26 Sep 2011 13:24:35 +0000 (13:24 +0000) | ||
committer | tolimar <tolimar@98d490a6-b407-0410-aaaa-fdee166ba3f5> | |
Mon, 26 Sep 2011 13:24:35 +0000 (13:24 +0000) |
git-svn-id: svn://svn.debian.org/svn/pkg-nagios/nagvis/trunk@1968 98d490a6-b407-0410-aaaa-fdee166ba3f5
debian/changelog | patch | blob | history | |
debian/config | patch | blob | history | |
debian/postinst | patch | blob | history | |
debian/postrm | patch | blob | history | |
debian/templates | [new file with mode: 0644] | patch | blob |
diff --git a/debian/changelog b/debian/changelog
index 747a247875e222cec0c2188850db727c2be9a51f..a58a85671e26f3fe919573d4ff8805687c58a569 100644 (file)
--- a/debian/changelog
+++ b/debian/changelog
* 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@debian.org> Wed, 07 Sep 2011 16:59:51 +0200
+ -- Alexander Reichle-Schmehl <tolimar@debian.org> Mon, 26 Sep 2011 15:23:50 +0200
nagvis (1:1.4.6-2) unstable; urgency=medium
diff --git a/debian/config b/debian/config
index d405a8b338ea29a2940368c0a5f5ce40ec136615..d3d7ea7ccbe4cc88626ba8c658c0d791189f2dc5 100644 (file)
--- a/debian/config
+++ b/debian/config
. /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
diff --git a/debian/postinst b/debian/postinst
index 925277a44fd87351bea7fb709317e9a509fa0fae..0a2093cb2106fa59fcd705e1c36f5503e048e42c 100644 (file)
--- a/debian/postinst
+++ b/debian/postinst
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>
# 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)
diff --git a/debian/postrm b/debian/postrm
index 1615814198634f270e44fb885ee0c4ed8055c427..f1a107960b6f11b76855339c784a4f02c626e5fa 100644 (file)
--- a/debian/postrm
+++ b/debian/postrm
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.
diff --git a/debian/templates b/debian/templates
--- /dev/null
+++ b/debian/templates
@@ -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.
+