summaryrefslogtreecommitdiff
path: root/debian/cups-daemon.postinst
diff options
context:
space:
mode:
authorDidier Raboud <odyx@debian.org>2014-02-25 16:47:34 +0100
committerDidier Raboud <odyx@debian.org>2014-02-25 16:47:34 +0100
commitc21517f02d7c71be3bd4667549756f00923feabb (patch)
treebe9d451e7ae98e7b8a368e8132139bbd6babdfbe /debian/cups-daemon.postinst
parent9cdde6e4af049e97a5df67520bf059a405d9fd82 (diff)
downloadcups-c21517f02d7c71be3bd4667549756f00923feabb.tar.gz
In postinst scripts, only chown and chmod when no dpkg-statoverrides are set
Closes: #587015
Diffstat (limited to 'debian/cups-daemon.postinst')
-rw-r--r--debian/cups-daemon.postinst12
1 files changed, 6 insertions, 6 deletions
diff --git a/debian/cups-daemon.postinst b/debian/cups-daemon.postinst
index d22fa0ff..258e61fa 100644
--- a/debian/cups-daemon.postinst
+++ b/debian/cups-daemon.postinst
@@ -8,12 +8,12 @@ if [ "$1" = configure ]; then
addgroup --system lpadmin
fi
- if [ -f /etc/cups/classes.conf ]; then
- chown root:lp /etc/cups/classes.conf ; chmod 600 /etc/cups/classes.conf
- fi
- if [ -f /etc/cups/printers.conf ]; then
- chown root:lp /etc/cups/printers.conf ; chmod 600 /etc/cups/printers.conf
- fi
+ for i in /etc/cups/classes.conf /etc/cups/printers.conf
+ do
+ if [ -f $i ] && ! dpkg-statoverride --list $i > /dev/null; then
+ chown root:lp $i; chmod 600 $i
+ fi
+ done
# symlink snakeoil SSL certificate if present
if [ -e /etc/ssl/certs/ssl-cert-snakeoil.pem -a \