]> git.ipfire.org Git - people/ms/dma.git/commitdiff
Change the ownership of the existing config files if upgrading from
authorPeter Pentchev <roam@ringlet.net>
Sat, 19 Dec 2009 12:23:41 +0000 (12:23 +0000)
committerPeter Pentchev <roam@ringlet.net>
Sat, 19 Dec 2009 12:23:41 +0000 (12:23 +0000)
an older version of the dma package.

changelog
postinst

index 47909d6c130a9325d8064c2dd49c47a5fa0b86aa..72c6fc821ef7a4ba909e9f6a6b29c289899f71e4 100644 (file)
--- 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.
index 3ce8c6c6b7ee68ca9ed164600f1ba0a86c7280f7..a165052deb8fa105c4bb4382b183362e59a25e97 100644 (file)
--- 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)