Revision: 81697 http://trac.macports.org/changeset/81697 Author: jmr@macports.org Date: 2011-08-04 07:25:22 -0700 (Thu, 04 Aug 2011) Log Message: ----------- imap-uw: fix check for root privileges not to rely on env(USER) Modified Paths: -------------- trunk/dports/mail/imap-uw/Portfile Modified: trunk/dports/mail/imap-uw/Portfile =================================================================== --- trunk/dports/mail/imap-uw/Portfile 2011-08-04 14:19:58 UTC (rev 81696) +++ trunk/dports/mail/imap-uw/Portfile 2011-08-04 14:25:22 UTC (rev 81697) @@ -87,7 +87,7 @@ destroot { # Warn user if not running as root - if {$env(USER) != "root"} { + if {[geteuid] != 0} { ui_msg "-----------------------------------------------------------" ui_msg "Note that you are not running as root, so files installed" ui_msg "by this port will not end up with proper ownership and" @@ -102,7 +102,7 @@ xinstall -m 0755 ${worksrcpath}/tmail/tmail ${destroot}${prefix}/bin xinstall -m 0755 ${worksrcpath}/dmail/dmail ${destroot}${prefix}/bin xinstall -m 0755 ${worksrcpath}/mtest/mtest ${destroot}${prefix}/bin/mboxtest - if {$env(USER) == "root"} { + if {[geteuid] == 0} { xinstall -g mail -m 2711 ${worksrcpath}/mlock/mlock ${destroot}${prefix}/libexec } else { xinstall -m 0711 ${worksrcpath}/mlock/mlock ${destroot}${prefix}/libexec