[Pkg-nagios-changes] [pkg-icinga2] 01/01: Move enable-feature to icinga2-bin
Alexander Wirt
formorer at debian.org
Sun Nov 23 19:56:44 UTC 2014
This is an automated email from the git hooks/post-receive script.
formorer pushed a commit to branch master
in repository pkg-icinga2.
commit 05f8f547a17cd4804186e42848aaf8b1f4800e27
Author: Alexander Wirt <formorer at debian.org>
Date: Sun Nov 23 20:56:05 2014 +0100
Move enable-feature to icinga2-bin
Closes: #770534
---
debian/control | 1 -
debian/icinga2-bin.postinst | 33 ++++++++++++++++++++++
.../{icinga2-common.postrm => icinga2-bin.postrm} | 10 +++----
debian/icinga2-common.postinst | 12 --------
debian/icinga2-common.postrm | 3 --
5 files changed, 37 insertions(+), 22 deletions(-)
diff --git a/debian/control b/debian/control
index 89a085f..9eb8068 100644
--- a/debian/control
+++ b/debian/control
@@ -61,7 +61,6 @@ Provides: python-icinga2
Depends:
adduser,
lsb-release,
- icinga2-bin (= ${source:Version}),
${misc:Depends}
Description: host and network monitoring system - common files
Icinga 2 is a general-purpose monitoring application to fit the needs of
diff --git a/debian/icinga2-bin.postinst b/debian/icinga2-bin.postinst
new file mode 100644
index 0000000..cb3d66d
--- /dev/null
+++ b/debian/icinga2-bin.postinst
@@ -0,0 +1,33 @@
+#!/bin/sh
+# postinst script for icinga2-bn
+
+set -e
+
+enable_default_features() {
+ FIX_VERSION="0.0.5+icingasnap201312070000"
+ if is_fresh_install $@ \
+ || dpkg --compare-versions "$2" lt "$FIX_VERSION"; then
+ echo "enabling default icinga2 features"
+ icinga2 feature enable checker notification mainlog
+ fi
+ # handle new default features here in the future
+}
+
+case "$1" in
+ configure)
+ # enable default features
+ enable_default_features $@
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/icinga2-common.postrm b/debian/icinga2-bin.postrm
similarity index 72%
copy from debian/icinga2-common.postrm
copy to debian/icinga2-bin.postrm
index 473635d..ed08a02 100644
--- a/debian/icinga2-common.postrm
+++ b/debian/icinga2-bin.postrm
@@ -1,5 +1,5 @@
#!/bin/sh
-# postrm script for icinga2-common
+# postrm script for icinga2-bin
set -e
@@ -8,12 +8,8 @@ case "$1" in
for f in /etc/icinga2/features-enabled/*; do
[ -L "$f" ] && rm -f "$f"
done
- rm -rf /var/lib/icinga2/
- rm -rf /var/log/icinga2/
- rm -rf /var/cache/icinga2/
- rm -rf /var/spool/icinga2/
;;
-
+
remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
;;
@@ -29,3 +25,5 @@ esac
#DEBHELPER#
exit 0
+
+
diff --git a/debian/icinga2-common.postinst b/debian/icinga2-common.postinst
index e4917e4..d77ff14 100644
--- a/debian/icinga2-common.postinst
+++ b/debian/icinga2-common.postinst
@@ -24,16 +24,6 @@ is_fresh_install()
return 1
}
-enable_default_features() {
- FIX_VERSION="0.0.5+icingasnap201312070000"
- if is_fresh_install $@ \
- || dpkg --compare-versions "$2" lt "$FIX_VERSION"; then
- echo "enabling default icinga2 features"
- icinga2 feature enable checker notification mainlog
- fi
- # handle new default features here in the future
-}
-
case "$1" in
configure)
if ! getent passwd nagios > /dev/null ; then
@@ -62,8 +52,6 @@ case "$1" in
setperm nagios nagios 0750 /var/spool/icinga2/perfdata
setperm nagios nagios 0750 /var/spool/icinga2/tmp
- # enable default features
- enable_default_features $@
;;
abort-upgrade|abort-remove|abort-deconfigure)
diff --git a/debian/icinga2-common.postrm b/debian/icinga2-common.postrm
index 473635d..aa697bd 100644
--- a/debian/icinga2-common.postrm
+++ b/debian/icinga2-common.postrm
@@ -5,9 +5,6 @@ set -e
case "$1" in
purge)
- for f in /etc/icinga2/features-enabled/*; do
- [ -L "$f" ] && rm -f "$f"
- done
rm -rf /var/lib/icinga2/
rm -rf /var/log/icinga2/
rm -rf /var/cache/icinga2/
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-nagios/pkg-icinga2.git
More information about the Pkg-nagios-changes
mailing list