From 55ad72d44a94298a96b8f05488ca5ed97ef04736 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 5 May 2024 20:37:15 +0200 Subject: Adding debian version 1:9.11.5.P4+dfsg-5.1+deb10u7. Signed-off-by: Daniel Baumann --- debian/bind9.preinst | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 debian/bind9.preinst (limited to 'debian/bind9.preinst') diff --git a/debian/bind9.preinst b/debian/bind9.preinst new file mode 100644 index 0000000..66b06ab --- /dev/null +++ b/debian/bind9.preinst @@ -0,0 +1,57 @@ +#!/bin/sh +# preinst script for bind9 +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `install' +# * `install' +# * `upgrade' +# * `abort-upgrade' +# for details, see https://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + install|upgrade) + if [ -n "$2" ] && dpkg --compare-versions "$2" lt "1:9.11.2+dfsg-6"; then + theirs=$(md5sum /etc/bind/named.conf.options | sed 's/ .*$//') + mine=56919cbc0d819c9a303a8bdeb306b5f1 + if [ "$mine" = "$theirs" ]; then + if [ -n "$(dpkg-query -f '${Conffiles}' -W bind9 | grep /etc/bind/named.conf.options)" ]; then + # dpkg knows /etc/bind/named.conf.options as a conffile (from squeeze or older) + # cannot move the outdated file aside to avoid dpkg noticing deleted-by-local-admin + # therefore edit it in place to make it match the to-be-installed version + cp -p /etc/bind/named.conf.options /etc/bind/named.conf.options.dpkg-old + sed -i '26{/^$/d}; 23{/auth-nxdomain no;/d}' /etc/bind/named.conf.options + else + mv /etc/bind/named.conf.options /etc/bind/named.conf.options.dpkg-old + fi + fi + fi + ;; + + abort-upgrade) + if [ ! -f "/etc/bind/named.conf.options" ] && [ -f "/etc/bind/named.conf.options.dpkg-old" ]; then + theirs=$(md5sum /etc/bind/named.conf.options.dpkg-old | sed 's/ .*$//') + mine=56919cbc0d819c9a303a8bdeb306b5f1 + if [ "$mine" = "$theirs" ]; then + mv /etc/bind/named.conf.options.dpkg-old /etc/bind/named.conf.options + fi + fi + ;; + + *) + echo "preinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 -- cgit v1.2.3