Ignore:
Timestamp:
Aug 4, 2011, 2:25:22 PM (8 years ago)
Author:
jmr@…
Message:

imap-uw: fix check for root privileges not to rely on env(USER)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/mail/imap-uw/Portfile

    r73666 r81697  
    8888destroot {
    8989    # Warn user if not running as root
    90     if {$env(USER) != "root"} {
     90    if {[geteuid] != 0} {
    9191        ui_msg "-----------------------------------------------------------"
    9292        ui_msg "Note that you are not running as root, so files installed"
     
    103103    xinstall -m 0755 ${worksrcpath}/dmail/dmail ${destroot}${prefix}/bin
    104104    xinstall -m 0755 ${worksrcpath}/mtest/mtest ${destroot}${prefix}/bin/mboxtest
    105     if {$env(USER) == "root"} {
     105    if {[geteuid] == 0} {
    106106        xinstall -g mail -m 2711 ${worksrcpath}/mlock/mlock ${destroot}${prefix}/libexec
    107107    } else {
Note: See TracChangeset for help on using the changeset viewer.