man: clarify that DefaultDependencies= is in the [Unit] section

This hopefully reduces confusion resulting in issues like #2992.
This commit is contained in:
Lennart Poettering 2016-04-08 19:00:00 +02:00
parent d2120590ff
commit cc4e4df49f
9 changed files with 55 additions and 94 deletions

View File

@ -97,11 +97,9 @@
<para>An implicit <varname>Before=</varname> dependency is created
between an automount unit and the mount unit it activates.</para>
<para>Automount units acquire automatic <varname>Before=</varname>
and <varname>Conflicts=</varname> on
<filename>umount.target</filename> in order to be stopped during
shutdown, unless <varname>DefaultDependencies=no</varname> is
set.</para>
<para>Automount units acquire automatic <varname>Before=</varname> and <varname>Conflicts=</varname> on
<filename>umount.target</filename> in order to be stopped during shutdown, unless
<varname>DefaultDependencies=no</varname> is set in the <literal>[Unit]</literal> section.</para>
</refsect1>

View File

@ -128,26 +128,17 @@
<filename>systemd-quotacheck.service</filename> and
<filename>quotaon.service</filename> are added.</para>
<para>For mount units with
<varname>DefaultDependencies=yes</varname> (the default) a couple
additional dependencies are added. Mount units referring to local
file systems automatically gain an <varname>After=</varname>
dependency on <filename>local-fs-pre.target</filename>. Network
mount units automatically acquire <varname>After=</varname>
dependencies on <filename>remote-fs-pre.target</filename>,
<filename>network.target</filename> and
<filename>network-online.target</filename>. Towards the latter a
<varname>Wants=</varname> unit is added as well. Mount units
referring to local and network file systems are distinguished by
their file system type specification. In some cases this is not
sufficient (for example network block device based mounts, such as
iSCSI), in which case <option>_netdev</option> may be added to the
mount option string of the unit, which forces systemd to consider the
mount unit a network mount. Mount units (regardless if local or
network) also acquire automatic <varname>Before=</varname> and
<varname>Conflicts=</varname> on
<filename>umount.target</filename> in order to be stopped
during shutdown.</para>
<para>For mount units with <varname>DefaultDependencies=yes</varname> in the <literal>[Unit]</literal> section (the
default) a couple additional dependencies are added. Mount units referring to local file systems automatically gain
an <varname>After=</varname> dependency on <filename>local-fs-pre.target</filename>. Network mount units
automatically acquire <varname>After=</varname> dependencies on <filename>remote-fs-pre.target</filename>,
<filename>network.target</filename> and <filename>network-online.target</filename>. Towards the latter a
<varname>Wants=</varname> unit is added as well. Mount units referring to local and network file systems are
distinguished by their file system type specification. In some cases this is not sufficient (for example network
block device based mounts, such as iSCSI), in which case <option>_netdev</option> may be added to the mount option
string of the unit, which forces systemd to consider the mount unit a network mount. Mount units (regardless if
local or network) also acquire automatic <varname>Before=</varname> and <varname>Conflicts=</varname> on
<filename>umount.target</filename> in order to be stopped during shutdown.</para>
<para>Additional implicit dependencies may be added as result of
execution and resource control parameters as documented in

View File

@ -91,16 +91,12 @@
<para>An implicit <varname>Before=</varname> dependency is added
between a path unit and the unit it is supposed to activate.</para>
<para>Unless <varname>DefaultDependencies=false</varname> is used,
path units will implicitly have dependencies of type
<varname>Before=</varname> on <filename>paths.target</filename>,
dependencies of type <varname>After=</varname> and
<varname>Requires=</varname> on
<filename>sysinit.target</filename>, and have dependencies of type
<varname>Conflicts=</varname> and <varname>Before=</varname> on
<filename>shutdown.target</filename>. These ensure that path units
are terminated cleanly prior to system shutdown. Only path units
involved with early boot or late system shutdown should disable
<para>Unless <varname>DefaultDependencies=false</varname> in the <literal>[Unit]</literal> section is used, path
units will implicitly have dependencies of type <varname>Before=</varname> on <filename>paths.target</filename>,
dependencies of type <varname>After=</varname> and <varname>Requires=</varname> on
<filename>sysinit.target</filename>, and have dependencies of type <varname>Conflicts=</varname> and
<varname>Before=</varname> on <filename>shutdown.target</filename>. These ensure that path units are terminated
cleanly prior to system shutdown. Only path units involved with early boot or late system shutdown should disable
this option.
</para>
</refsect1>

View File

@ -100,18 +100,13 @@
their activated <filename>.socket</filename> units via an
automatic <varname>After=</varname> dependency.</para>
<para>Unless <varname>DefaultDependencies=</varname> is set to
<option>false</option>, service units will implicitly have
dependencies of type <varname>Requires=</varname> and
<varname>After=</varname> on <filename>sysinit.target</filename>,
a dependency of type <varname>After=</varname> on
<filename>basic.target</filename> as well as dependencies of
type <varname>Conflicts=</varname> and <varname>Before=</varname>
on <filename>shutdown.target</filename>. These ensure that normal
service units pull in basic system initialization, and are
terminated cleanly prior to system shutdown. Only services
involved with early boot or late system shutdown should disable
this option.</para>
<para>Unless <varname>DefaultDependencies=</varname> in the <literal>[Unit]</literal> is set to
<option>false</option>, service units will implicitly have dependencies of type <varname>Requires=</varname> and
<varname>After=</varname> on <filename>sysinit.target</filename>, a dependency of type <varname>After=</varname> on
<filename>basic.target</filename> as well as dependencies of type <varname>Conflicts=</varname> and
<varname>Before=</varname> on <filename>shutdown.target</filename>. These ensure that normal service units pull in
basic system initialization, and are terminated cleanly prior to system shutdown. Only services involved with early
boot or late system shutdown should disable this option.</para>
<para>Instanced service units (i.e. service units with an <literal>@</literal> in their name) are assigned by
default a per-template slice unit (see

View File

@ -106,14 +106,10 @@
<varname>After=</varname> and <varname>Requires=</varname> on
their immediate parent slice unit.</para>
<para>Unless <varname>DefaultDependencies=false</varname>
is used, slice units will implicitly have dependencies of
type <varname>Conflicts=</varname> and
<varname>Before=</varname> on
<filename>shutdown.target</filename>. These ensure
that slice units are removed prior to system
shutdown. Only slice units involved with early boot or
late system shutdown should disable this option.
<para>Unless <varname>DefaultDependencies=false</varname> is used in the <literal>[Unit]</literal> section, slice
units will implicitly have dependencies of type <varname>Conflicts=</varname> and <varname>Before=</varname> on
<filename>shutdown.target</filename>. These ensure that slice units are removed prior to system shutdown. Only
slice units involved with early boot or late system shutdown should disable this option.
</para>
</refsect1>

View File

@ -97,16 +97,12 @@
<filename>foo@.service</filename> must exist from which services
are instantiated for each incoming connection.</para>
<para>Unless <varname>DefaultDependencies=</varname> is set to
<option>false</option>, socket units will implicitly have
dependencies of type <varname>Requires=</varname> and
<varname>After=</varname> on <filename>sysinit.target</filename>
as well as dependencies of type <varname>Conflicts=</varname> and
<varname>Before=</varname> on
<filename>shutdown.target</filename>. These ensure that socket
units pull in basic system initialization, and are terminated
cleanly prior to system shutdown. Only sockets involved with early
boot or late system shutdown should disable this option.</para>
<para>Unless <varname>DefaultDependencies=</varname> in the <literal>[Unit]</literal> section is set to
<option>false</option>, socket units will implicitly have dependencies of type <varname>Requires=</varname> and
<varname>After=</varname> on <filename>sysinit.target</filename> as well as dependencies of type
<varname>Conflicts=</varname> and <varname>Before=</varname> on <filename>shutdown.target</filename>. These ensure
that socket units pull in basic system initialization, and are terminated cleanly prior to system shutdown. Only
sockets involved with early boot or late system shutdown should disable this option.</para>
<para>Socket units will have a <varname>Before=</varname>
dependency on the service which they trigger added implicitly. No

View File

@ -95,12 +95,10 @@
dependencies on the device units or the mount units of the files
they are activated from.</para>
<para>Swap units with <varname>DefaultDependencies=</varname>
enabled implicitly acquire a <varname>Conflicts=</varname> and an
<varname>After=</varname> dependency on
<filename>umount.target</filename> so that they are deactivated at
shutdown, unless <varname>DefaultDependencies=no</varname> is
specified.</para>
<para>Swap units with <varname>DefaultDependencies=</varname> in the <literal>[Unit]</literal> section enabled
implicitly acquire a <varname>Conflicts=</varname> and an <varname>After=</varname> dependency on
<filename>umount.target</filename> so that they are deactivated at shutdown, unless
<varname>DefaultDependencies=no</varname> is specified.</para>
<para>Additional implicit dependencies may be added as result of
execution and resource control parameters as documented in

View File

@ -82,14 +82,11 @@
<refsect1>
<title>Automatic Dependencies</title>
<para>Unless <varname>DefaultDependencies=</varname> is set to
<option>no</option>, target units will implicitly complement all
configured dependencies of type <varname>Wants=</varname>,
<varname>Requires=</varname> with dependencies of type
<varname>After=</varname>, unless an ordering dependency of any
kind between the target and the respective other unit is already
in place. Note that this behaviour is disabled if either unit has
<varname>DefaultDependencies=no</varname>.</para>
<para>Unless <varname>DefaultDependencies=</varname> in the <literal>[Unit]</literal> section is set to
<option>no</option>, target units will implicitly complement all configured dependencies of type
<varname>Wants=</varname>, <varname>Requires=</varname> with dependencies of type <varname>After=</varname>, unless
an ordering dependency of any kind between the target and the respective other unit is already in place. Note that
this behaviour is disabled if either unit has <varname>DefaultDependencies=no</varname>.</para>
</refsect1>
<refsect1>

View File

@ -81,21 +81,15 @@
<para>Timer units automatically gain a <varname>Before=</varname>
dependency on the service they are supposed to activate.</para>
<para>Unless <varname>DefaultDependencies=</varname> is set to
<option>false</option>, all timer units will implicitly have
dependencies of type <varname>Requires=</varname> and
<varname>After=</varname> on <filename>sysinit.target</filename>,
a dependency of type <varname>Before=</varname> on
<filename>timers.target</filename>, as well as
<varname>Conflicts=</varname> and <varname>Before=</varname> on
<filename>shutdown.target</filename> to ensure that they are
stopped cleanly prior to system shutdown. Timer units with at
least one <varname>OnCalendar=</varname> directive will have an
additional <varname>After=</varname> dependency on
<filename>timer-sync.target</filename> to avoid being started
before the system clock has been correctly set. Only timer units
involved with early boot or late system shutdown should disable
the <varname>DefaultDependencies=</varname> option.</para>
<para>Unless <varname>DefaultDependencies=</varname> in the <literal>[Unit]</literal> section is set to
<option>false</option>, all timer units will implicitly have dependencies of type <varname>Requires=</varname> and
<varname>After=</varname> on <filename>sysinit.target</filename>, a dependency of type <varname>Before=</varname>
on <filename>timers.target</filename>, as well as <varname>Conflicts=</varname> and <varname>Before=</varname> on
<filename>shutdown.target</filename> to ensure that they are stopped cleanly prior to system shutdown. Timer units
with at least one <varname>OnCalendar=</varname> directive will have an additional <varname>After=</varname>
dependency on <filename>timer-sync.target</filename> to avoid being started before the system clock has been
correctly set. Only timer units involved with early boot or late system shutdown should disable the
<varname>DefaultDependencies=</varname> option.</para>
</refsect1>
<refsect1>