[71982] trunk/dports/mail/postfix/Portfile

jmr at macports.org jmr at macports.org
Wed Sep 29 06:37:38 PDT 2010


Revision: 71982
          http://trac.macports.org/changeset/71982
Author:   jmr at macports.org
Date:     2010-09-29 06:37:36 -0700 (Wed, 29 Sep 2010)
Log Message:
-----------
postfix: try to handle non-root installs a bit better

Modified Paths:
--------------
    trunk/dports/mail/postfix/Portfile

Modified: trunk/dports/mail/postfix/Portfile
===================================================================
--- trunk/dports/mail/postfix/Portfile	2010-09-29 13:25:47 UTC (rev 71981)
+++ trunk/dports/mail/postfix/Portfile	2010-09-29 13:37:36 UTC (rev 71982)
@@ -121,7 +121,14 @@
 }
 
 pre-install {
-        system "chown ${pf_mail_owner} ${destroot}${prefix}/var/spool/postfix/public/.turd_postfix"
+        if {[geteuid] == 0} {
+            system "chown -R ${pf_mail_owner} \
+                '${destroot}${prefix}/var/spool/postfix/public' \
+                '${destroot}${prefix}/var/lib/postfix'"
+        } else {
+            ui_msg "Insufficient privileges to chown files; you'll need to do this manually:"
+            ui_msg "sudo chown -R ${pf_mail_owner} ${prefix}/var/spool/postfix/public ${prefix}/var/lib/postfix"
+        }
 }
 
 post-activate {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100929/d4cbc2af/attachment-0001.html>


More information about the macports-changes mailing list