dbus and launchd
Dan Ports
dports at ambulatoryclam.net
Thu Jan 21 11:06:48 PST 2010
On Thu, Jan 21, 2010 at 02:26:44PM +0100, Rainer M?ller wrote:
> 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.
This is one of the things I was wondering about -- what the policy is
(if one exists) for ports with launchd plists.
I think it's quite reasonable that externally-accessible network
services shouldn't be enabled by default. (Note, though, that this isn't
universally agreed -- on Debian/Ubuntu, for example, installing a
package enables it and starts it up right away. I find this slightly
alarming!)
It may be useful to distinguish services that are only accessible
locally. For these, it makes some sense to enable them by default if
their default configuration is reasonable. Especially so if launchd can
start them on-demand, keeping the overhead to a minimum if not actually
used.
dbus is the main example that comes to mind here, though there are
probably others. My thinking is "would I want this enabled if it got
sucked in as a dependency and I had no idea it was installed?". For
dbus, I'd say my answer is yes -- there's not much downside since it's
not accessible over the network and can be started on demand, and
without it loaded, dependent apps don't work.
Dan
--
Dan R. K. Ports MIT CSAIL http://drkp.net/
More information about the macports-dev
mailing list