Hypothetical "port load",
"port unload" commands (and "turn" script)
Ryan Schmidt
ryandesign at macports.org
Wed Nov 21 15:53:22 PST 2007
On Nov 21, 2007, at 03:34, Randall Wood wrote:
> On 20 Nov 2007, at 12:07, James Berry wrote:
>
>> On Nov 20, 2007, at 9:01 AM, Ryan Schmidt wrote:
>>
>>> [snip]
>>>
>>> sudo launchctl load -w /Library/LaunchDaemons/org.macports.foo.plist
>>>
>>> is not easy to remember, and it's a lot to type.
>>>
>>> [snip]
>>>
>>> It would be nice to have easier-to-remember commands included
>>> with MacPorts [...]. [W]hat about:
>>>
>>> sudo port load foo
>>>
>>> and
>>>
>>> sudo port unload bar
>>>
>>> ? That's pretty easy to remember in my opinion. What do you think?
>>
>> I like this. We could look for a startupitem in the port, get the
>> name, and put the proper command together for launchctl. Very
>> nice. Do we have any other conceivable uses for the words load and
>> unload that this might conflict with?
>>
>>> This proposed syntax limits us to one launchctl plist per port.
>>> However, we already have that limit, so I don't consider it a big
>>> problem at this time.
>
> We already have ports that install multiple lauchctl plists per
> port, although they use upstream provided plists to do so (avahi).
avahi is the only one I know of that installs multiple launchctl
plists. And it doesn't do so using portfile directives, because the
startupitem directives do not support more than one plist per port.
So the addition of "port load" needn't affect avahi users; they can
continue to use the launchctl commands they're already used to.
Or, "port load" could accept an optional additional argument. For
example, if we had plists org.macports.foo.client.plist and
org.macports.foo.server.plist installed by a hypothetical port foo,
then "port load foo" would error out, advising the user to choose
client or server. The user could "port load foo client" or "port load
foo server".
More information about the macports-dev
mailing list