[systemd-devel] [HEADS-UP] Default Dependencies
Lennart Poettering
lennart at poettering.net
Sat Jul 3 11:05:36 PDT 2010
Heya,
I just commited a patch I worked on yesterday that adds a
DefaultDependencies= switch to the unit file parser. It takes a boolean
argument and defaults to "true", in which case a few automatic
dependencies are added to the unit that ensure that a service pulls in
basic system initialization and started only after that step
completed. Also, it ensures that services are terminated cleanly on
system shutdown.
The advantage of this logic is that for the majority of normal services
no manual configuration of dependencies will be required anymore. This
makes unit files shorter, and less prone to configuration errors, since
as soon as socket-based activation is available by default for the major
services most developers won't have to declare a single dependency in
their service files anymore. And that makes the whole socket-based
activate shine.
Of course, manual dependencies stay available, and continue to be
important for early boot-up. But for normal services they should be of
little importance now.
The reason I am announcing this change here is to make everybody aware
that existing service unit files that are designed to run as part of
early bootup (i.e. before basic.target) need to be updated to set
DefaultDependencies=true -- because this new logic would otherwise push
them behind basic.target. Notably, udev needs to be updated like
this. The unit files shipped along systemd are already updated
accordingly.
Lennart
--
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel
mailing list