port load/unload

Jeremy Huddleston jeremyhu at macports.org
Sat Sep 18 13:54:35 PDT 2010


On Sep 18, 2010, at 13:08, Jeremy Lavergne wrote:

>>> Do we "do the right thing" by not having them use 'sudo' for LaunchAgents on Snow Leopard?
>> 
>> MacPorts does not make any difference between LaunchDaemons and
>> LaunchAgents. The default for startupitem.location is LaunchDaemons and
>> I am not aware of any port changing this setting. There are dbus and
>> xinit installing LaunchAgents, but those use custom methods/messages.
>> 
>> It always prints 'sudo' in this message. I am not even sure if the
>> command 'port load' works without root privileges...
> 
> I think we can add something like:
> 
> if {${build.asroot} == "yes"} {
> ui_msg (no newline) "sudo "
> }
> ui_msg "port load ${name}"

Well if this is only for LaunchDaemons, then using sudo would be correct.  For some reason, I thought this affected LaunchAgents as well.  Please disregard =)



More information about the macports-dev mailing list