Perform a configuration sanity check during the package configuration. This should avoid service disruptions when upgrading the package after changing the configuration file into a broken state. See [1] for further reference.
[1] https://bugs.launchpad.net/ubuntu/+source/bind9/+bug/1492212 --- debian/bind9.postinst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/debian/bind9.postinst b/debian/bind9.postinst index 69333d060..079682158 100644 --- a/debian/bind9.postinst +++ b/debian/bind9.postinst @@ -30,6 +30,10 @@ if [ "$1" = configure ]; then chmod g+r /etc/bind/rndc.key /etc/bind/named.conf* || true chmod g+rwx /var/cache/bind fi + + # Configuration file sanity check. This should avoid the upgrade process to + # stop a running service when starting it after the upgrade would fail + /usr/sbin/named-checkconf /etc/bind/named.conf fi #DEBHELPER# -- 2.32.0 -- Athos Ribeiro

