From 034834675707e76791d320cdba350580461c368c Mon Sep 17 00:00:00 2001 From: Peter Pentchev Date: Sat, 19 Dec 2009 12:23:41 +0000 Subject: [PATCH] Change the ownership of the existing config files if upgrading from an older version of the dma package. --- changelog | 5 +++-- postinst | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) 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) -- 2.47.3