Remove obsolete files and old upgrade paths for users coming from version prior to wheezy

This commit is contained in:
Laurent Bigonville 2019-07-27 20:19:19 +02:00
parent 9aba586fa8
commit 3115b529b2
15 changed files with 39 additions and 632 deletions

9
debian/Makefile.am vendored
View file

@ -1,9 +0,0 @@
EXTRA_DIST = changelog control copyright description.subst hotplug \
nut-cgi.config nut-cgi.docs nut-cgi.examples nut-cgi.postinst nut-cgi.postrm \
nut-cgi.preinst nut-cgi.README.Debian nut-cgi.templates nut.config \
nut.default nut.dirs nut.docs nut.examples nut-hal-drivers.docs \
nut-server.init nut-client.init nut-client.links \
nut.postinst nut.postrm nut.preinst nut.prerm nut.README.Debian \
nut.templates nut.TODO.Debian rules watch \
po/ca.po po/cs.po po/de.po po/fr.po po/POTFILES.in \
po/pt.po po/pt_BR.po po/templates.pot po/vi.po

381
debian/Makefile.in vendored
View file

@ -1,381 +0,0 @@
# Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
subdir = packaging/debian
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/nut_arg_with.m4 \
$(top_srcdir)/m4/nut_check_hiddev.m4 \
$(top_srcdir)/m4/nut_check_ipv6.m4 \
$(top_srcdir)/m4/nut_check_libgd.m4 \
$(top_srcdir)/m4/nut_check_libhal.m4 \
$(top_srcdir)/m4/nut_check_libneon.m4 \
$(top_srcdir)/m4/nut_check_libnetsnmp.m4 \
$(top_srcdir)/m4/nut_check_libssl.m4 \
$(top_srcdir)/m4/nut_check_libusb.m4 \
$(top_srcdir)/m4/nut_report_feature.m4 \
$(top_srcdir)/m4/nut_type_socklen_t.m4 \
$(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/include/config.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CONFPATH = @CONFPATH@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@
DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@
DRIVER_MAN_LIST = @DRIVER_MAN_LIST@
DSYMUTIL = @DSYMUTIL@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GREP = @GREP@
HAL_CALLOUTS_PATH = @HAL_CALLOUTS_PATH@
HAL_FDI_PATH = @HAL_FDI_PATH@
HAL_USER = @HAL_USER@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBGD_CFLAGS = @LIBGD_CFLAGS@
LIBGD_LDFLAGS = @LIBGD_LDFLAGS@
LIBHAL_CFLAGS = @LIBHAL_CFLAGS@
LIBHAL_LDFLAGS = @LIBHAL_LDFLAGS@
LIBNEON_CFLAGS = @LIBNEON_CFLAGS@
LIBNEON_LDFLAGS = @LIBNEON_LDFLAGS@
LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@
LIBNETSNMP_LDFLAGS = @LIBNETSNMP_LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBSSL_CFLAGS = @LIBSSL_CFLAGS@
LIBSSL_LDFLAGS = @LIBSSL_LDFLAGS@
LIBTOOL = @LIBTOOL@
LIBUSB_CFLAGS = @LIBUSB_CFLAGS@
LIBUSB_LDFLAGS = @LIBUSB_LDFLAGS@
LINUX_HIDDEV = @LINUX_HIDDEV@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
NETLIBS = @NETLIBS@
NMEDIT = @NMEDIT@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
RUN_AS_GROUP = @RUN_AS_GROUP@
RUN_AS_USER = @RUN_AS_USER@
SED = @SED@
SERLIBS = @SERLIBS@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STATEPATH = @STATEPATH@
STRIP = @STRIP@
SUN_LIBUSB = @SUN_LIBUSB@
VERSION = @VERSION@
WORDS_BIGENDIAN = @WORDS_BIGENDIAN@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
cgiexecdir = @cgiexecdir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
driverexecdir = @driverexecdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
hotplugdir = @hotplugdir@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
pkgconfigdir = @pkgconfigdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
udevdir = @udevdir@
EXTRA_DIST = changelog control copyright description.subst hotplug \
nut-cgi.config nut-cgi.docs nut-cgi.examples nut-cgi.postinst nut-cgi.postrm \
nut-cgi.preinst nut-cgi.README.Debian nut-cgi.templates nut.config \
nut.default nut.dirs nut.docs nut.examples nut-hal-drivers.docs \
nut.init nut.links nut.postinst nut.postrm nut.preinst nut.prerm \
nut.README.Debian nut.templates nut.TODO.Debian \
rules watch po/ca.po po/cs.po po/de.po po/fr.po po/POTFILES.in \
po/pt.po po/pt_BR.po po/templates.pot po/vi.po
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu packaging/debian/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu packaging/debian/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-exec-am:
install-html: install-html-am
install-info: install-info-am
install-man:
install-pdf: install-pdf-am
install-ps: install-ps-am
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am:
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-dvi install-dvi-am \
install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-man install-pdf \
install-pdf-am install-ps install-ps-am install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

4
debian/changelog vendored
View file

@ -36,8 +36,10 @@ nut (2.7.4-9) UNRELEASED; urgency=medium
* debian/nut-monitor.install: Install nut-monitor.appdata.xml in
/usr/share/metainfo/ instead of /usr/share/appdata/
* Simplify debian/rules, install systemd files on non-linux arch as well
* Remove obsolete files and old upgrade paths for users coming from version
prior to wheezy
-- Laurent Bigonville <bigon@debian.org> Sat, 27 Jul 2019 18:49:39 +0200
-- Laurent Bigonville <bigon@debian.org> Sat, 27 Jul 2019 20:18:02 +0200
nut (2.7.4-8) unstable; urgency=medium

8
debian/control vendored
View file

@ -51,9 +51,6 @@ Depends: adduser,
${shlibs:Depends},
udev [linux-any]
Suggests: nut-cgi, nut-ipmi, nut-snmp, nut-xml
Conflicts: nut-hal-drivers
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
@ -72,8 +69,7 @@ Provides: ups-monitor
Conflicts: ups-monitor
Recommends: bash-completion
Suggests: nut-monitor
Replaces: nut (<< 2.6.1-2~), nut-server (<< 2.6.3-1~), ups-monitor
Breaks: nut (<< 2.6.1-2~), nut-server (<< 2.6.3-1~)
Replaces: ups-monitor
Pre-Depends: ${misc:Pre-Depends}
Description: network UPS tools - clients
Network UPS Tools (NUT) is a client/server monitoring system that
@ -194,8 +190,6 @@ Depends: libupsclient4 (= ${binary:Version}),
libnss3-dev,
${misc:Depends},
${shlibs:Depends}
Conflicts: libupsclient1-dev
Replaces: libupsclient1-dev
Description: network UPS tools - development files
Network UPS Tools (NUT) is a client/server monitoring system that
allows computers to share uninterruptible power supply (UPS) and

View file

@ -1 +0,0 @@
description=nut is a client/server uninterruptible power supply (UPS) monitoring system${Newline}${Space}that permits the sharing of one (or more) UPS between several machines. The${Newline}${Space}'server' monitors the UPS and notifies the 'clients' when the UPS is on${Newline}${Space}battery or has a low battery.

24
debian/hotplug vendored
View file

@ -1,24 +0,0 @@
#!/bin/bash
# taken from libgphoto2
GROUP=nut
# for previous udev versions
if [ "$ACTION" = "add" ] && [ -f "$DEVICE" ]
then
# check if $GROUP really exists
if getent group $GROUP > /dev/null; then
chmod 660 "$DEVICE"
chown root:$GROUP "$DEVICE"
fi
fi
# for recent udev versions
if [ "$ACTION" = "add" ] && [ -r "$DEVNAME" ]
then
# check if $GROUP really exists
if getent group $GROUP > /dev/null; then
chmod 660 "$DEVNAME"
chown root:$GROUP "$DEVNAME"
fi
fi

View file

@ -31,15 +31,7 @@ case "$1" in
done
;;
abort-upgrade)
# do nothing
;;
abort-remove)
# do nothing
;;
abort-deconfigure)
abort-upgrade|abort-remove|abort-deconfigure)
# do nothing
;;

47
debian/nut-cgi.postrm vendored
View file

@ -1,47 +0,0 @@
#!/bin/sh -e
case "$1" in
remove)
# remove sample file if those were previously (wrongly) installed
for file in upsset.conf hosts.conf upsstats.html upsstats-single.html ; do
if [ -f /etc/nut/${file}.sample ] ; then
rm -f /etc/nut/${file}.sample
fi
done
;;
purge)
# do nothing
;;
upgrade)
# do nothing
;;
failed-upgrade)
# do nothing
;;
abort-install)
# do nothing
;;
abort-upgrade)
# do nothing
;;
disappear)
# do nothing
;;
*)
echo "$0: incorrect arguments: $*" >&2
exit 1
;;
esac
#DEBHELPER#
exit 0

View file

@ -54,27 +54,9 @@ case "$1" in
restorecon /run/nut
fi
fi
if dpkg --compare-versions "$2" le "2.6.4-2~" &&
[ -f /etc/init.d/nut ] ; then
if [ "`md5sum /etc/init.d/nut | cut -d ' ' -f 1`" = 72f1dbc6b92cb4407f26605d05b12681 ]; then
rm -f /etc/init.d/nut
else
mv /etc/init.d/nut /etc/init.d/nut.dpkg-old
fi
update-rc.d nut remove >/dev/null
fi
;;
abort-upgrade)
# do nothing
;;
abort-remove)
# do nothing
;;
abort-deconfigure)
abort-upgrade|abort-remove|abort-deconfigure)
# do nothing
;;

20
debian/nut-client.postrm vendored Normal file
View file

@ -0,0 +1,20 @@
#!/bin/sh
set -e
case "$1" in
remove)
[ -d /run/nut ] && rmdir --ignore-fail-on-non-empty /run/nut >/dev/null 2>&1
;;
purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
;;
*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
;;
esac
#DEBHELPER#
exit 0

View file

@ -1,23 +0,0 @@
#!/bin/sh
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 ] \
&& [ "`md5sum /etc/nut/nut.conf | cut -d ' ' -f 1`" = f9b571ae65952e3a761fac2202633478 ]; then
sed -i 's/^MODE=none$/MODE = none/' /etc/nut/nut.conf
fi
#DEBHELPER#

View file

@ -66,29 +66,9 @@ case "$1" in
# ask udev to check for new udev rules
[ -x /etc/init.d/udev ] && pidof systemd-udevd > /dev/null \
&& udevadm trigger --subsystem-match=usb --action=change
# 557178 udevadm trigger --subsystem-match=usb
if dpkg --compare-versions "$2" le "2.6.4-2~" &&
[ -f /etc/init.d/nut ] ; then
if [ "`md5sum /etc/init.d/nut | cut -d ' ' -f 1`" = 72f1dbc6b92cb4407f26605d05b12681 ]; then
rm -f /etc/init.d/nut
else
mv /etc/init.d/nut /etc/init.d/nut.dpkg-old
fi
update-rc.d nut remove >/dev/null
fi
;;
abort-upgrade)
# do nothing
;;
abort-remove)
# do nothing
;;
abort-deconfigure)
abort-upgrade|abort-remove|abort-deconfigure)
# do nothing
;;

View file

@ -1,48 +1,18 @@
#!/bin/sh -e
#!/bin/sh
set -e
case "$1" in
remove)
# remove sample file if those were previously (wrongly) installed
for file in ups.conf upsd.conf upsmon.conf upsd.users upssched.conf ; do
rm -f /etc/nut/${file}.sample
done
[ -d /run/nut ] && rmdir --ignore-fail-on-non-empty /run/nut >/dev/null 2>&1
;;
purge)
# remove udev rules files
rm -f /etc/udev/rules.d/025_nut-usbups.rules
rm -f /etc/udev/rules.d/52_nut-usbups.rules
rm -f /etc/udev/rules.d/52-nut-usbups.rules
# handle a dpkg bug
[ -d /etc/nut ] && rmdir --ignore-fail-on-non-empty /etc/nut >/dev/null 2>&1
;;
upgrade)
# do nothing
;;
failed-upgrade)
# do nothing
;;
abort-install)
# do nothing
;;
abort-upgrade)
# do nothing
;;
disappear)
# do nothing
purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
;;
*)
echo "$0: incorrect arguments: $*" >&2
echo "postrm called with unknown argument \`$1'" >&2
exit 1
;;
esac
#DEBHELPER#

View file

@ -1,12 +0,0 @@
#!/bin/sh -e
if [ "$1" = upgrade ]; then
# 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
fi
#DEBHELPER#
exit 0

View file

@ -1,8 +1,5 @@
#!/bin/sh -e
# the DEBHELPER token is purposely not used
# because we don't want the daemon to be
# stopped during an upgrade
#!/bin/sh
set -e
handle_start_failure () {
# The MODE defined in /etc/nut/nut.conf shouldn't affect the exit code when the
@ -11,39 +8,6 @@ handle_start_failure () {
return 1
}
case "$1" in
remove)
# nut-usb specifics
[ -f /etc/hotplug/usb/libhid.usermap ] && rm -f /etc/hotplug/usb/libhid.usermap
[ -f /etc/hotplug/usb/libhidups ] && rm -f /etc/hotplug/usb/libhidups
[ -L /usr/doc/nut ] && rm -f /usr/doc/nut
# do stop the daemon on remove
invoke-rc.d nut stop && sleep 1
[ -d /run/nut ] && rm -rf /run/nut/
;;
upgrade)
[ -L /usr/doc/nut ] && rm -f /usr/doc/nut
# do not stop the daemon on upgrade
;;
failed-upgrade)
# do nothing
;;
deconfigure)
# do nothing
;;
*)
echo "$0: incorrect arguments: $*" >&2
exit 1
;;
esac
#DEBHELPER#
exit 0