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
28
debian/nut-server.postinst
vendored
28
debian/nut-server.postinst
vendored
|
|
@ -19,15 +19,18 @@ case "$1" in
|
|||
# fi
|
||||
|
||||
# make sure that conffiles are secured and have the correct ownerships
|
||||
if [ -d /etc/nut/ ] ; then
|
||||
chown root:nut /etc/nut/
|
||||
fi
|
||||
for file in ups.conf upsd.conf upsd.users ; do
|
||||
if [ -f /etc/nut/$file ] ; then
|
||||
chown root:nut /etc/nut/$file
|
||||
chmod 640 /etc/nut/$file
|
||||
# on first install
|
||||
if [ -z "$2" ] ; then
|
||||
if [ -d /etc/nut/ ] ; then
|
||||
chown root:nut /etc/nut/
|
||||
fi
|
||||
done
|
||||
for file in ups.conf upsd.conf upsd.users ; do
|
||||
if [ -f /etc/nut/$file ] ; then
|
||||
chown root:nut /etc/nut/$file
|
||||
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
|
||||
rm -f /etc/init.d/nut
|
||||
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…
Add table
Add a link
Reference in a new issue