How to make "sudo port install" run a post-activate script with only user permission?

Jeremy Lavergne jeremy at lavergne.gotdns.org
Thu Oct 4 08:19:36 PDT 2012


>> And I run as a non-admin user, so I have to 'su' to another user before 'sudo' installing a port. Who is the proper 'installing user', and can you tell?

Yes, that's partly why logname exists. It will report kevin in after each step:
 1: login as kevin
 2: su to jeremy
 3: sudo -s

>> What if you want to 'install for' multiple users?

The installers only get run when a user logs in... there's no need to worry about installing all over ahead of time.

>> Better to have user-dependent operations done independently of MacPorts and independent of system-wide directories, IMO.
> 
> I agree.
> 
> It would be appropriate to install LaunchAgents and scripts to help current and future users of the system configure the software and env for proper function.

Agree as well :-)



More information about the macports-dev mailing list