From: Peter Pentchev Date: Sat, 19 Dec 2009 12:23:41 +0000 (+0000) Subject: Change the ownership of the existing config files if upgrading from X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=034834675707e76791d320cdba350580461c368c;p=people%2Fms%2Fdma.git Change the ownership of the existing config files if upgrading from an older version of the dma package. --- diff --git a/changelog b/changelog index 47909d6..72c6fc8 100644 --- a/changelog +++ b/changelog @@ -1,7 +1,8 @@ dma (0.0.2009.07.17-3) unstable; urgency=low - * Really install the files in /etc/dma/ as root/mail/640. - Closes: #544664 + * Really install the files in /etc/dma/ as root/mail/640 and + change the ownership of the existing files in the postinst script + when upgrading from older versions. Closes: #544664 * Install the /usr/bin/mailq and /usr/bin/newaliases symlinks. Closes: #558421 * Switch to the 3.0 (quilt) source format. diff --git a/postinst b/postinst index 3ce8c6c..a165052 100644 --- a/postinst +++ b/postinst @@ -18,6 +18,11 @@ case "$1" in db_get dma/dbounceprog sed -i -re 's/^[[:space:]]*(#+[[:space:]]*)?DBOUNCEPROG([[:space:]]+.*)?$/DBOUNCEPROG '"$RET/" /etc/dma/dma.conf + + if dpkg --compare-versions "$2" lt '0.0.2009.07.17-3'; then + chown root:mail /etc/dma/* + chmod 640 /etc/dma/* + fi ;; abort-upgrade|abort-remove|abort-deconfigure)