diff --git a/debian/changelog b/debian/changelog index b320316..e7b612b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +nut (2.6.4-2.3) unstable; urgency=low + + * Non-maintainer upload with fixes for wheezy. + * debian/nut-client.preinst: also revert /etc/nut/nut.conf mangling done + by postinst during upgrade from lenny to squeeze (Really closes: #677054) + Thanks to Andreas Beckmann for the review. + + -- Ivo De Decker Sat, 26 Jan 2013 20:09:48 +0100 + nut (2.6.4-2.2) unstable; urgency=low * Non-maintainer upload with fixes for wheezy. diff --git a/debian/nut-client.preinst b/debian/nut-client.preinst index 2107da1..53134e3 100644 --- a/debian/nut-client.preinst +++ b/debian/nut-client.preinst @@ -4,6 +4,15 @@ set -e # Revert /etc/nut/nut.conf mangling done by older versions of the postinst # See #677054 +# changed configfile created by a fresh install in lenny, upgraded to squeeze +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`" = 331cca39153f451c2968f4b734c1cf3f ]; then + sed -i '29,$ d' /etc/nut/nut.conf +fi + +# changed configfile created by a fresh install in squeeze if [ "$1" = "install" -o "$1" = "upgrade" ] \ && dpkg --compare-versions "$2" lt "2.6.4-2" \ && [ -f /etc/nut/nut.conf ] \