debian/nut-client.preinst: revert /etc/nut/nut.conf mangling done by older versions of the postinst (Closes: #677054)

This commit is contained in:
Sébastien Villemot 2012-11-27 08:34:19 +01:00
parent c79bcd71af
commit a80da4998d
2 changed files with 19 additions and 0 deletions

5
debian/changelog vendored
View file

@ -1,9 +1,14 @@
nut (2.6.5-2) UNRELEASED; urgency=low
[ Laurent Bigonville ]
* debian/control: Move the nut-monitor Suggests from nut-server to
nut-client
* Restore proper SELinux context for runtime created /var/run/nut directory
[ Sébastien Villemot ]
* debian/nut-client.preinst: revert /etc/nut/nut.conf mangling done by older
versions of the postinst (Closes: #677054)
-- Laurent Bigonville <bigon@debian.org> Tue, 09 Oct 2012 23:38:10 +0200
nut (2.6.5-1) experimental; urgency=low

14
debian/nut-client.preinst vendored Normal file
View file

@ -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#