diff --git a/debian/changelog b/debian/changelog index a603e8c..88b850b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +nut (2.6.4-2.1) unstable; urgency=low + + * Non-maintainer upload. + * debian/nut-client.preinst: revert /etc/nut/nut.conf mangling done by older + versions of the postinst (Closes: #677054) + + -- Sébastien Villemot Mon, 26 Nov 2012 21:09:33 +0100 + nut (2.6.4-2) unstable; urgency=low * debian/rules: Stop the nut-client before nut-server on systems using static diff --git a/debian/nut-client.preinst b/debian/nut-client.preinst new file mode 100644 index 0000000..2107da1 --- /dev/null +++ b/debian/nut-client.preinst @@ -0,0 +1,14 @@ +#!/bin/sh + +set -e + +# Revert /etc/nut/nut.conf mangling done by older versions of the postinst +# See #677054 +if [ "$1" = "install" -o "$1" = "upgrade" ] \ + && dpkg --compare-versions "$2" lt "2.6.4-2" \ + && [ -f /etc/nut/nut.conf ] \ + && [ "`md5sum /etc/nut/nut.conf | cut -d ' ' -f 1`" = f9b571ae65952e3a761fac2202633478 ]; then + sed -i 's/^MODE=none$/MODE = none/' /etc/nut/nut.conf +fi + +#DEBHELPER#