Only remove /etc/init.d/nut from previous versions of nut in nut-server postinst if there are no local changes.
* 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.
This commit is contained in:
parent
d54dd54840
commit
715368e54f
6
debian/changelog
vendored
6
debian/changelog
vendored
|
@ -13,8 +13,12 @@ nut (2.6.5-2) UNRELEASED; urgency=low
|
||||||
|
|
||||||
[ Ivo De Decker ]
|
[ Ivo De Decker ]
|
||||||
* Only fix permissions of configfiles on first install.
|
* Only fix permissions of configfiles on first install.
|
||||||
|
* 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.
|
||||||
|
|
||||||
-- Laurent Bigonville <bigon@debian.org> Sun, 13 Jan 2013 17:31:15 +0100
|
-- Laurent Bigonville <bigon@debian.org> Sun, 13 Jan 2013 17:36:13 +0100
|
||||||
|
|
||||||
nut (2.6.5-1) experimental; urgency=low
|
nut (2.6.5-1) experimental; urgency=low
|
||||||
|
|
||||||
|
|
10
debian/nut-client.postinst
vendored
10
debian/nut-client.postinst
vendored
|
@ -41,6 +41,16 @@ case "$1" in
|
||||||
chmod 770 /var/run/nut
|
chmod 770 /var/run/nut
|
||||||
[ -x /sbin/restorecon ] && /sbin/restorecon /var/run/nut
|
[ -x /sbin/restorecon ] && /sbin/restorecon /var/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)
|
abort-upgrade)
|
||||||
|
|
9
debian/nut-server.postinst
vendored
9
debian/nut-server.postinst
vendored
|
@ -54,8 +54,13 @@ case "$1" in
|
||||||
|
|
||||||
# 557178 udevadm trigger --subsystem-match=usb
|
# 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~" &&
|
||||||
rm -f /etc/init.d/nut
|
[ -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
|
update-rc.d nut remove >/dev/null
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user