dbus and launchd

Rainer Müller raimue at macports.org
Thu Jan 21 05:26:44 PST 2010


On 2010-01-21 07:12 , Ryan Schmidt wrote:
>> Moving to on-demand would also make it pretty reasonable in my
>> view to enable the launchd jobs on port install, eliminating the
>> need for users to run two launchctl load commands (of which one
>> needs to be run as root and the other *not* as root!)
> 
> On-demand launching has been requested in some of my ports (see
> tickets) but I declined, saying it should be handled in base. I
> haven't used on-demand plists so I don't know about any bugs
> involved. Are there any downsides to on-demand launching? Should it
> be an option in macports.conf?

First of all, the documentation for launchd files can be found in the
man page launchd.plist(5), which might have instant answers to any
questions coming up.

OnDemand is a deprecated key from <=10.4 and has been replaced with
KeepAlive as of 10.5. It specifies if a daemon should be kept running
all the time (false) or only started when necessary based on network
state, sockets, file paths, ... (true). KeepAlive was introduced to
support some more fine-grained conditions. launchd files created by
MacPorts always set OnDemand to false.

Note that all files are being installed with Disabled set to true, so
that the user needs to load the file manually. This is a reasonable
decision as the user might want to edit the configuration in
/opt/local/etc before running the daemon. As it might open ports and
provide services on the network it should not do this without approval
of the user in general.

Rainer


More information about the macports-dev mailing list