Imported Debian patch 2.6.4-2.2
This commit is contained in:
parent
6bfb45a6bc
commit
d8a36de1df
4 changed files with 53 additions and 19 deletions
13
debian/changelog
vendored
13
debian/changelog
vendored
|
@ -1,3 +1,16 @@
|
|||
nut (2.6.4-2.2) unstable; urgency=low
|
||||
|
||||
* Non-maintainer upload with fixes for wheezy.
|
||||
* Only remove /etc/init.d/nut from previous versions of nut in nut-server
|
||||
postinst if there are no local changes.
|
||||
* Also remove /etc/init.d/nut in nut-client postinst. Thanks to
|
||||
Laurent Bigonville for the hint.
|
||||
* Only fix permissions of configfiles on first install.
|
||||
* debian/control: Fix typo in package description. Thanks to Julien Cristau
|
||||
for spotting this.
|
||||
|
||||
-- Ivo De Decker <ivo.dedecker@ugent.be> Thu, 20 Dec 2012 20:40:01 +0100
|
||||
|
||||
nut (2.6.4-2.1) unstable; urgency=low
|
||||
|
||||
* Non-maintainer upload.
|
||||
|
|
2
debian/control
vendored
2
debian/control
vendored
|
@ -33,7 +33,7 @@ Description: network UPS tools - metapackage
|
|||
through the server, and are notified whenever the power status
|
||||
changes.
|
||||
.
|
||||
This package is a metapackage that install both nut-server and nut-client,
|
||||
This package is a metapackage that installs both nut-server and nut-client,
|
||||
in most cases it is sufficient for a basic UPS monitoring system.
|
||||
|
||||
Package: nut-server
|
||||
|
|
13
debian/nut-client.postinst
vendored
13
debian/nut-client.postinst
vendored
|
@ -19,6 +19,8 @@ case "$1" in
|
|||
# fi
|
||||
|
||||
# make sure that conffiles are secured and have the correct ownerships
|
||||
# on first install
|
||||
if [ -z "$2" ] ; then
|
||||
if [ -d /etc/nut/ ] ; then
|
||||
chown root:nut /etc/nut/
|
||||
fi
|
||||
|
@ -28,6 +30,7 @@ case "$1" in
|
|||
chmod 640 /etc/nut/$file
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# make sure that /var/run/nut exists and has the correct ownerships
|
||||
if [ ! -d /var/run/nut ] ; then
|
||||
|
@ -37,6 +40,16 @@ case "$1" in
|
|||
chown root:nut /var/run/nut
|
||||
chmod 770 /var/run/nut
|
||||
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)
|
||||
|
|
10
debian/nut-server.postinst
vendored
10
debian/nut-server.postinst
vendored
|
@ -19,6 +19,8 @@ case "$1" in
|
|||
# fi
|
||||
|
||||
# make sure that conffiles are secured and have the correct ownerships
|
||||
# on first install
|
||||
if [ -z "$2" ] ; then
|
||||
if [ -d /etc/nut/ ] ; then
|
||||
chown root:nut /etc/nut/
|
||||
fi
|
||||
|
@ -28,6 +30,7 @@ case "$1" in
|
|||
chmod 640 /etc/nut/$file
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# make sure that /var/run/nut exists and has the correct ownerships
|
||||
if [ ! -d /var/run/nut ] ; then
|
||||
|
@ -50,8 +53,13 @@ case "$1" in
|
|||
|
||||
# 557178 udevadm trigger --subsystem-match=usb
|
||||
|
||||
if dpkg --compare-versions "$2" le "2.6.4-2~" ; then
|
||||
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
|
||||
;;
|
||||
|
|
Loading…
Reference in a new issue