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.

This commit is contained in:
Laurent Bigonville 2013-06-18 21:21:00 +02:00
parent c51fe5965a
commit cc689212ad
2 changed files with 15 additions and 0 deletions

6
debian/changelog vendored
View file

@ -1,5 +1,6 @@
nut (2.6.5-3) UNRELEASED; urgency=low
[ Laurent Bigonville ]
* debian/control:
- Move libupsclient1 package to libs Section
- Add libgd-dev to the Build-Depends, keep the other alternatives to ease
@ -9,6 +10,11 @@ nut (2.6.5-3) UNRELEASED; urgency=low
getting updated during build
- Use canonical URL for the VCS-* fields
[ Ivo De Decker ]
* 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.
-- Laurent Bigonville <bigon@debian.org> Tue, 14 May 2013 18:04:04 +0200
nut (2.6.5-2) experimental; urgency=low

View file

@ -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 ] \