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

View file

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

View file

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

View file

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

View file

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

View file

@ -97,16 +97,12 @@
<filename>foo@.service</filename> must exist from which services <filename>foo@.service</filename> must exist from which services
are instantiated for each incoming connection.</para> are instantiated for each incoming connection.</para>
<para>Unless <varname>DefaultDependencies=</varname> is set to <para>Unless <varname>DefaultDependencies=</varname> in the <literal>[Unit]</literal> section is set to
<option>false</option>, socket units will implicitly have <option>false</option>, socket units will implicitly have dependencies of type <varname>Requires=</varname> and
dependencies of type <varname>Requires=</varname> and <varname>After=</varname> on <filename>sysinit.target</filename> as well as dependencies of type
<varname>After=</varname> on <filename>sysinit.target</filename> <varname>Conflicts=</varname> and <varname>Before=</varname> on <filename>shutdown.target</filename>. These ensure
as well as dependencies of type <varname>Conflicts=</varname> and that socket units pull in basic system initialization, and are terminated cleanly prior to system shutdown. Only
<varname>Before=</varname> on sockets involved with early boot or late system shutdown should disable this option.</para>
<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> <para>Socket units will have a <varname>Before=</varname>
dependency on the service which they trigger added implicitly. No 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 dependencies on the device units or the mount units of the files
they are activated from.</para> they are activated from.</para>
<para>Swap units with <varname>DefaultDependencies=</varname> <para>Swap units with <varname>DefaultDependencies=</varname> in the <literal>[Unit]</literal> section enabled
enabled implicitly acquire a <varname>Conflicts=</varname> and an implicitly acquire a <varname>Conflicts=</varname> and an <varname>After=</varname> dependency on
<varname>After=</varname> dependency on <filename>umount.target</filename> so that they are deactivated at shutdown, unless
<filename>umount.target</filename> so that they are deactivated at <varname>DefaultDependencies=no</varname> is specified.</para>
shutdown, unless <varname>DefaultDependencies=no</varname> is
specified.</para>
<para>Additional implicit dependencies may be added as result of <para>Additional implicit dependencies may be added as result of
execution and resource control parameters as documented in execution and resource control parameters as documented in

View file

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

View file

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