diff --git a/debian/changelog b/debian/changelog index 54fc67e..9642eba 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,7 +2,7 @@ nut (2.6.4-3) UNRELEASED; urgency=low * debian/rules: Stop the nut-client before nut-server on systems using static boot ordering (Closes: #679451) - * debian/nut-server.maintscript: Remove /etc/init.d/nut on upgrade + * debian/nut-server.postinst: Remove /etc/init.d/nut on upgrade (Closes: #677822) * Rename nut-server.lintian-overrides to nut-client.lintian-overrides and adjust overrides now that ups-monitor is shipped in nut-client package diff --git a/debian/control b/debian/control index cd6b27e..684855a 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: admin Priority: optional Maintainer: Arnaud Quette Uploaders: Laurent Bigonville -Build-Depends: debhelper (>= 8.1.0~), +Build-Depends: debhelper (>= 8), cdbs (>= 0.4.90~), libgd2-xpm-dev | libgd2-noxpm-dev, libsnmp-dev | libsnmp9-dev, @@ -45,7 +45,6 @@ Provides: nut-usb Conflicts: nut-hal-drivers, nut-usb (<< 2.1.0-3), nut-dev (<< 2.2.2) Replaces: nut (<< 2.6.1-2~) Breaks: nut (<< 2.6.1-2~) -Pre-Depends: ${misc:Pre-Depends} Description: network UPS tools - core system Network UPS Tools (NUT) is a client/server monitoring system that allows computers to share uninterruptible power supply (UPS) and diff --git a/debian/nut-server.maintscript b/debian/nut-server.maintscript deleted file mode 100644 index 1d202d4..0000000 --- a/debian/nut-server.maintscript +++ /dev/null @@ -1,3 +0,0 @@ -#Removing obsolete init script. -#The file is gone in 2.6.3-2 but was not removed on upgrades. -rm_conffile /etc/init.d/nut 2.6.4-3~ diff --git a/debian/nut-server.postinst b/debian/nut-server.postinst index c2574b8..7952552 100644 --- a/debian/nut-server.postinst +++ b/debian/nut-server.postinst @@ -49,6 +49,11 @@ case "$1" in && udevadm trigger --subsystem-match=usb --action=change # 557178 udevadm trigger --subsystem-match=usb + + if dpkg --compare-versions "$2" le "2.6.4-2~" ; then + rm -f /etc/init.d/nut + update-rc.d nut remove >/dev/null + fi ;; abort-upgrade)