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
3 changed files with 22 additions and 3 deletions
10
debian/nut-client.postinst
vendored
10
debian/nut-client.postinst
vendored
|
@ -41,6 +41,16 @@ case "$1" in
|
|||
chmod 770 /var/run/nut
|
||||
[ -x /sbin/restorecon ] && /sbin/restorecon /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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue