From: Michael Howe Date: Thu, 21 Dec 2017 18:33:43 +0000 (+0000) Subject: Add postinst and prerm to dpkg-divert unbound_munin_ X-Git-Tag: 0.10~2 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=fd9ace89458d7456477452b3b5dd8d00658a8bc1;p=packages%2Fm%2Fmunin-plugins-local.git Add postinst and prerm to dpkg-divert unbound_munin_ This plugin is shipped in unbound in stretch, which causes a bunch of issues. Eventually, we should remove the plugin (and the divert) from here. --- diff --git a/debian/changelog b/debian/changelog index 24284a1..ed040b8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,9 @@ -munin-plugins-local (0.10~test.3) UNRELEASED; urgency=medium +munin-plugins-local (0.10~test.4) UNRELEASED; urgency=medium * Add lvmcache_ plugin, for graphing lvm cache state + * Add prerm and postinst to handle duplication of unbound_munin_ (also + provided by unbound in stretch). Eventually we should move to that + plugin, but not until we're on stretch everywhere. -- Michael Howe Sat, 16 Dec 2017 22:12:26 +0000 diff --git a/debian/postinst b/debian/postinst new file mode 100644 index 0000000..bd9d5d9 --- /dev/null +++ b/debian/postinst @@ -0,0 +1,15 @@ +#!/bin/sh + +set -e + +if [ "$1" = configure ]; then + DEBIAN_VERSION=$(sed -e 's/\..*//' /etc/debian_version) + if [ $DEBIAN_VERSION -gt 8 ]; then + # for stretch and above unbound includes the unbound_munin plugin itself + dpkg-divert --add --package munin-plugins-local --rename --divert /usr/share/munin/plugins/unbound_munin_.distrib /usr/share/munin/plugins/unbound_munin_ + fi +fi + +#DEBHELPER# + +exit 0 diff --git a/debian/prerm b/debian/prerm new file mode 100644 index 0000000..b028e1a --- /dev/null +++ b/debian/prerm @@ -0,0 +1,15 @@ +#!/bin/sh + +set -e + +if [ "$1" = remove ]; then + DEBIAN_VERSION=$(sed -e 's/\..*//' /etc/debian_version) + if [ $DEBIAN_VERSION -gt 8 ]; then + # for stretch and above unbound includes the unbound_munin plugin itself + dpkg-divert --remove --package munin-plugins-local --rename --divert /usr/share/munin/plugins/unbound_munin_.distrib /usr/share/munin/plugins/unbound_munin_ + fi +fi + +#DEBHELPER# + +exit 0