Fix bug #660072 (obsolete udev rules left in /etc)

This commit is contained in:
Arnaud Quette 2012-06-06 21:06:03 +02:00
parent 112d9a7c99
commit 39a7ae33fb
2 changed files with 10 additions and 15 deletions

8
debian/changelog vendored
View file

@ -1,11 +1,15 @@
nut (2.6.4-1) UNRELEASED; urgency=low
nut (2.6.4-1) unstable; urgency=high
* New upstream release (Closes: #671444)
* acknowledges NMU (Closes: #613643)
* debian/nut-client.init: fix action "start" and use of log_*_*msg
LSB log functions (Closes: #675619)
* debian/nut-server.preinst: remove obsolete file(s) left in
/etc/udev/rules.d and related processing: udev files are now located
in /lib/udev/rules, and there is no reason to modify the dedicated
USB UPS rules (52-nut-usbups.rules) (Closes: #660072)
-- Arnaud Quette <aquette@debian.org> Fri, 01 Jun 2012 16:15:20 +0200
-- Arnaud Quette <aquette@debian.org> Wed, 06 Jun 2012 21:03:50 +0200
nut (2.6.3-2) unstable; urgency=low

View file

@ -1,19 +1,10 @@
#!/bin/sh -e
if [ "$1" = upgrade ]; then
# remove the obsolete udev file
[ -f /etc/udev/rules.d/025_nut-usbups.rules ] && rm -f /etc/udev/rules.d/025_nut-usbups.rules
# Remove previous rules if unchanged, otherwise move to new filename.
if [ -e "/etc/udev/rules.d/52_nut-usbups.rules" ]; then
if [ "`md5sum \"/etc/udev/rules.d/52_nut-usbups.rules\" | sed -e \"s/ .*//\"`" = \
"`dpkg-query -W -f='${Conffiles}' nut | sed -n -e \"\\\\' /etc/udev/rules.d/52_nut-usbups.rules's/.* //p\"`" ]
then
rm -f "/etc/udev/rules.d/52_nut-usbups.rules"
else
mv "/etc/udev/rules.d/52_nut-usbups.rules" "/etc/udev/rules.d/52-nut-usbups.rules"
fi
fi
# remove the obsolete udev file(s)
[ -f /etc/udev/rules.d/025_nut-usbups.rules ] && rm -f /etc/udev/rules.d/025_nut-usbups.rules
[ -f /etc/udev/rules.d/52_nut-usbups.rules ] && rm -f /etc/udev/rules.d/52_nut-usbups.rules
[ -f /etc/udev/rules.d/52-nut-usbups.rules ] && rm -f /etc/udev/rules.d/52-nut-usbups.rules
# migrate /etc/default/nut to /etc/nut/nut.conf (part #1)
# we need to do this before default gets trashed