diff options
author | Didier Raboud <odyx@debian.org> | 2014-02-25 16:47:34 +0100 |
---|---|---|
committer | Didier Raboud <odyx@debian.org> | 2014-02-25 16:47:34 +0100 |
commit | c21517f02d7c71be3bd4667549756f00923feabb (patch) | |
tree | be9d451e7ae98e7b8a368e8132139bbd6babdfbe /debian/cups-daemon.postinst | |
parent | 9cdde6e4af049e97a5df67520bf059a405d9fd82 (diff) | |
download | cups-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.postinst | 12 |
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 \ |