mirror of
https://github.com/systemd/systemd.git
synced 2024-11-24 10:43:35 +08:00
Merge pull request #6801 from johnlinp/master
man: explicitly distinguish "implicit dependencies" and "default dependencies"
This commit is contained in:
commit
21f0669163
@ -70,7 +70,7 @@
|
||||
<citerefentry
|
||||
project='man-pages'><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>),
|
||||
the units this generator creates are overridden, but additional
|
||||
automatic dependencies might be created.</para>
|
||||
implicit dependencies might be created.</para>
|
||||
|
||||
<para>This generator will only look for root partitions on the
|
||||
same physical disk the EFI System Partition (ESP) is located on.
|
||||
|
@ -87,19 +87,30 @@
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Automatic Dependencies</title>
|
||||
<title>Implicit Dependencies</title>
|
||||
|
||||
<para>If an automount unit is beneath another mount unit in the
|
||||
file system hierarchy, both a requirement and an ordering
|
||||
dependency between both units are created automatically.</para>
|
||||
<para>The following dependencies are implicitly added:</para>
|
||||
|
||||
<para>An implicit <varname>Before=</varname> dependency is created
|
||||
between an automount unit and the mount unit it activates.</para>
|
||||
<itemizedlist>
|
||||
<listitem><para>If an automount unit is beneath another mount unit in the
|
||||
file system hierarchy, both a requirement and an ordering
|
||||
dependency between both units are created automatically.</para></listitem>
|
||||
|
||||
<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>
|
||||
<listitem><para>An implicit <varname>Before=</varname> dependency is created
|
||||
between an automount unit and the mount unit it activates.</para></listitem>
|
||||
</itemizedlist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Default Dependencies</title>
|
||||
|
||||
<para>The following dependencies are added unless <varname>DefaultDependencies=no</varname> is set:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem><para>Automount units acquire automatic <varname>Before=</varname> and
|
||||
<varname>Conflicts=</varname> on <filename>umount.target</filename> in order to be stopped during
|
||||
shutdown.</para></listitem>
|
||||
</itemizedlist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
|
@ -92,7 +92,7 @@
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Automatic Dependencies</title>
|
||||
<title>Implicit Dependencies</title>
|
||||
|
||||
<para>Many unit types automatically acquire dependencies on device
|
||||
units of devices they require. For example,
|
||||
@ -103,6 +103,12 @@
|
||||
block devices.</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Default Dependencies</title>
|
||||
|
||||
<para>There are no default dependencies for device units.</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>The udev Database</title>
|
||||
|
||||
|
@ -81,27 +81,30 @@
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Automatic Dependencies</title>
|
||||
<title>Implicit Dependencies</title>
|
||||
|
||||
<para>A few execution parameters result in additional, automatic
|
||||
dependencies to be added.</para>
|
||||
<para>A few execution parameters result in additional, automatic dependencies to be added:</para>
|
||||
|
||||
<para>Units with <varname>WorkingDirectory=</varname>, <varname>RootDirectory=</varname>, <varname>RootImage=</varname>,
|
||||
<varname>RuntimeDirectory=</varname>, <varname>StateDirectory=</varname>, <varname>CacheDirectory=</varname>,
|
||||
<varname>LogsDirectory=</varname> or <varname>ConfigurationDirectory=</varname> set automatically gain dependencies
|
||||
of type <varname>Requires=</varname> and <varname>After=</varname> on all mount units required to access the specified paths.
|
||||
This is equivalent to having them listed explicitly in <varname>RequiresMountsFor=</varname>.</para>
|
||||
<itemizedlist>
|
||||
<listitem><para>Units with <varname>WorkingDirectory=</varname>, <varname>RootDirectory=</varname>, <varname>RootImage=</varname>,
|
||||
<varname>RuntimeDirectory=</varname>, <varname>StateDirectory=</varname>, <varname>CacheDirectory=</varname>,
|
||||
<varname>LogsDirectory=</varname> or <varname>ConfigurationDirectory=</varname> set automatically gain dependencies
|
||||
of type <varname>Requires=</varname> and <varname>After=</varname> on all mount units required to access the specified paths.
|
||||
This is equivalent to having them listed explicitly in <varname>RequiresMountsFor=</varname>.</para></listitem>
|
||||
|
||||
<para>Similar, units with <varname>PrivateTmp=</varname> enabled automatically get mount unit dependencies for all
|
||||
mounts required to access <filename>/tmp</filename> and <filename>/var/tmp</filename>. They will also gain an
|
||||
automatic <varname>After=</varname> dependency on
|
||||
<citerefentry><refentrytitle>systemd-tmpfiles-setup.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
|
||||
<listitem><para>Similar, units with <varname>PrivateTmp=</varname> enabled automatically get mount unit dependencies for all
|
||||
mounts required to access <filename>/tmp</filename> and <filename>/var/tmp</filename>. They will also gain an
|
||||
automatic <varname>After=</varname> dependency on
|
||||
<citerefentry><refentrytitle>systemd-tmpfiles-setup.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para></listitem>
|
||||
|
||||
<para>Units whose standard output or error output is connected to <option>journal</option>, <option>syslog</option>
|
||||
or <option>kmsg</option> (or their combinations with console output, see below) automatically acquire dependencies
|
||||
of type <varname>After=</varname> on <filename>systemd-journald.socket</filename>.</para>
|
||||
<listitem><para>Units whose standard output or error output is connected to <option>journal</option>, <option>syslog</option>
|
||||
or <option>kmsg</option> (or their combinations with console output, see below) automatically acquire dependencies
|
||||
of type <varname>After=</varname> on <filename>systemd-journald.socket</filename>.</para></listitem>
|
||||
</itemizedlist>
|
||||
</refsect1>
|
||||
|
||||
<!-- We don't have any default dependency here. -->
|
||||
|
||||
<refsect1>
|
||||
<title>Options</title>
|
||||
|
||||
@ -615,7 +618,7 @@
|
||||
|
||||
<para>If the standard output (or error output, see below) of a unit is connected to the journal, syslog or the
|
||||
kernel log buffer, the unit will implicitly gain a dependency of type <varname>After=</varname> on
|
||||
<filename>systemd-journald.socket</filename> (also see the automatic dependencies section above).</para>
|
||||
<filename>systemd-journald.socket</filename> (also see the "Implicit Dependencies" section above).</para>
|
||||
|
||||
<para>This setting defaults to the value set with
|
||||
<option>DefaultStandardOutput=</option> in
|
||||
|
@ -109,40 +109,57 @@
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Automatic Dependencies</title>
|
||||
<title>Implicit Dependencies</title>
|
||||
|
||||
<para>If a mount unit is beneath another mount unit in the file
|
||||
system hierarchy, both a requirement dependency and an ordering
|
||||
dependency between both units are created automatically.</para>
|
||||
<para>The following dependencies are implicitly added:</para>
|
||||
|
||||
<para>Block device backed file systems automatically gain
|
||||
<varname>BindsTo=</varname> and <varname>After=</varname> type
|
||||
dependencies on the device unit encapsulating the block
|
||||
device (see below).</para>
|
||||
<itemizedlist>
|
||||
<listitem><para>If a mount unit is beneath another mount unit in the file
|
||||
system hierarchy, both a requirement dependency and an ordering
|
||||
dependency between both units are created automatically.</para></listitem>
|
||||
|
||||
<para>If traditional file system quota is enabled for a mount
|
||||
unit, automatic <varname>Wants=</varname> and
|
||||
<varname>Before=</varname> dependencies on
|
||||
<filename>systemd-quotacheck.service</filename> and
|
||||
<filename>quotaon.service</filename> are added.</para>
|
||||
<listitem><para>Block device backed file systems automatically gain
|
||||
<varname>BindsTo=</varname> and <varname>After=</varname> type
|
||||
dependencies on the device unit encapsulating the block
|
||||
device (see below).</para></listitem>
|
||||
|
||||
<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
|
||||
<listitem><para>If traditional file system quota is enabled for a mount
|
||||
unit, automatic <varname>Wants=</varname> and
|
||||
<varname>Before=</varname> dependencies on
|
||||
<filename>systemd-quotacheck.service</filename> and
|
||||
<filename>quotaon.service</filename> are added.</para></listitem>
|
||||
|
||||
<listitem><para>Additional implicit dependencies may be added as result of
|
||||
execution and resource control parameters as documented in
|
||||
<citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||
and
|
||||
<citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Default Dependencies</title>
|
||||
|
||||
<para>The following dependencies are added unless <varname>DefaultDependencies=no</varname> is set:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem><para>All mount units acquire automatic <varname>Before=</varname> and <varname>Conflicts=</varname> on
|
||||
<filename>umount.target</filename> in order to be stopped during shutdown.</para></listitem>
|
||||
|
||||
<listitem><para>Mount units referring to local file systems automatically gain
|
||||
an <varname>After=</varname> dependency on <filename>local-fs-pre.target</filename>.</para></listitem>
|
||||
|
||||
<listitem><para>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.</para></listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para>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
|
||||
<citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||
and
|
||||
<citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
|
||||
string of the unit, which forces systemd to consider the mount unit a network mount.</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
|
@ -82,23 +82,36 @@
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Automatic Dependencies</title>
|
||||
<title>Implicit Dependencies</title>
|
||||
|
||||
<para>If a path unit is beneath another mount unit in the file
|
||||
system hierarchy, both a requirement and an ordering dependency
|
||||
between both units are created automatically.</para>
|
||||
<para>The following dependencies are implicitly added:</para>
|
||||
|
||||
<para>An implicit <varname>Before=</varname> dependency is added
|
||||
between a path unit and the unit it is supposed to activate.</para>
|
||||
<itemizedlist>
|
||||
<listitem><para>If a path unit is beneath another mount unit in the file
|
||||
system hierarchy, both a requirement and an ordering dependency
|
||||
between both units are created automatically.</para></listitem>
|
||||
|
||||
<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>
|
||||
<listitem><para>An implicit <varname>Before=</varname> dependency is added
|
||||
between a path unit and the unit it is supposed to activate.</para></listitem>
|
||||
</itemizedlist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Default Dependencies</title>
|
||||
|
||||
<para>The following dependencies are added unless <varname>DefaultDependencies=no</varname> is set:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem><para>Path units will automatically 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 <varname>DefaultDependencies=</varname> option.</para></listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para></para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
|
@ -93,12 +93,19 @@
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Automatic Dependencies</title>
|
||||
<title>Implicit Dependencies</title>
|
||||
|
||||
<para>Units with the <varname>Slice=</varname> setting set automatically acquire <varname>Requires=</varname> and
|
||||
<varname>After=</varname> dependencies on the specified slice unit.</para>
|
||||
<para>The following dependencies are implicitly added:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem><para>Units with the <varname>Slice=</varname> setting set automatically acquire
|
||||
<varname>Requires=</varname> and <varname>After=</varname> dependencies on the specified
|
||||
slice unit.</para></listitem>
|
||||
</itemizedlist>
|
||||
</refsect1>
|
||||
|
||||
<!-- We don't have any default dependency here. -->
|
||||
|
||||
<refsect1>
|
||||
<title>Unified and Legacy Control Group Hierarchies</title>
|
||||
|
||||
@ -578,7 +585,7 @@
|
||||
<para>Special care should be taken when relying on the default slice assignment in templated service units
|
||||
that have <varname>DefaultDependencies=no</varname> set, see
|
||||
<citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>, section
|
||||
"Automatic Dependencies" for details.</para>
|
||||
"Default Dependencies" for details.</para>
|
||||
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -75,22 +75,31 @@
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Automatic Dependencies</title>
|
||||
<title>Implicit Dependencies</title>
|
||||
|
||||
<para>Unless <varname>DefaultDependencies=false</varname>
|
||||
is used, scope units will implicitly have dependencies of
|
||||
type <varname>Conflicts=</varname> and
|
||||
<varname>Before=</varname> on
|
||||
<filename>shutdown.target</filename>. These ensure
|
||||
that scope units are removed prior to system
|
||||
shutdown. Only scope units involved with early boot or
|
||||
late system shutdown should disable this option.
|
||||
</para>
|
||||
|
||||
<para>Additional implicit dependencies may be added as result of
|
||||
<para>Implicit dependencies may be added as result of
|
||||
resource control parameters as documented in
|
||||
<citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Default Dependencies</title>
|
||||
|
||||
<para>The following dependencies are added unless
|
||||
<varname>DefaultDependencies=no</varname> is set:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem><para>Scope units will automatically have dependencies of
|
||||
type <varname>Conflicts=</varname> and
|
||||
<varname>Before=</varname> on
|
||||
<filename>shutdown.target</filename>. These ensure
|
||||
that scope units are removed prior to system
|
||||
shutdown. Only scope units involved with early boot or
|
||||
late system shutdown should disable
|
||||
<varname>DefaultDependencies=</varname> option.</para></listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para></para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
|
@ -89,37 +89,23 @@
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Automatic Dependencies</title>
|
||||
<title>Implicit Dependencies</title>
|
||||
|
||||
<para>Services with <varname>Type=dbus</varname> set automatically
|
||||
acquire dependencies of type <varname>Requires=</varname> and
|
||||
<varname>After=</varname> on
|
||||
<filename>dbus.socket</filename>.</para>
|
||||
<para>The following dependencies are implicitly added:</para>
|
||||
|
||||
<para>Socket activated services are automatically ordered after
|
||||
their activating <filename>.socket</filename> units via an
|
||||
automatic <varname>After=</varname> dependency.
|
||||
Services also pull in all <filename>.socket</filename> units
|
||||
listed in <varname>Sockets=</varname> via automatic
|
||||
<varname>Wants=</varname> and <varname>After=</varname> dependencies.</para>
|
||||
<itemizedlist>
|
||||
<listitem><para>Services with <varname>Type=dbus</varname> set automatically
|
||||
acquire dependencies of type <varname>Requires=</varname> and
|
||||
<varname>After=</varname> on
|
||||
<filename>dbus.socket</filename>.</para></listitem>
|
||||
|
||||
<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
|
||||
<citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry>), named after the
|
||||
template unit, containing all instances of the specific template. This slice is normally stopped at shutdown,
|
||||
together with all template instances. If that is not desired, set <varname>DefaultDependencies=no</varname> in the
|
||||
template unit, and either define your own per-template slice unit file that also sets
|
||||
<varname>DefaultDependencies=no</varname>, or set <varname>Slice=system.slice</varname> (or another suitable slice)
|
||||
in the template unit. Also see
|
||||
<citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
|
||||
<listitem><para>Socket activated services are automatically ordered after
|
||||
their activating <filename>.socket</filename> units via an
|
||||
automatic <varname>After=</varname> dependency.
|
||||
Services also pull in all <filename>.socket</filename> units
|
||||
listed in <varname>Sockets=</varname> via automatic
|
||||
<varname>Wants=</varname> and <varname>After=</varname> dependencies.</para></listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para>Additional implicit dependencies may be added as result of
|
||||
execution and resource control parameters as documented in
|
||||
@ -128,6 +114,32 @@
|
||||
<citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Default Dependencies</title>
|
||||
|
||||
<para>The following dependencies are added unless <varname>DefaultDependencies=no</varname> is set:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem><para>Service units will 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></listitem>
|
||||
|
||||
<listitem><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
|
||||
<citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry>), named after the
|
||||
template unit, containing all instances of the specific template. This slice is normally stopped at shutdown,
|
||||
together with all template instances. If that is not desired, set <varname>DefaultDependencies=no</varname> in the
|
||||
template unit, and either define your own per-template slice unit file that also sets
|
||||
<varname>DefaultDependencies=no</varname>, or set <varname>Slice=system.slice</varname> (or another suitable slice)
|
||||
in the template unit. Also see
|
||||
<citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Options</title>
|
||||
|
||||
|
@ -103,17 +103,29 @@
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Automatic Dependencies</title>
|
||||
<title>Implicit Dependencies</title>
|
||||
|
||||
<para>Slice units automatically gain dependencies of type
|
||||
<varname>After=</varname> and <varname>Requires=</varname> on
|
||||
their immediate parent slice unit.</para>
|
||||
<para>The following dependencies are implicitly added:</para>
|
||||
|
||||
<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>
|
||||
<itemizedlist>
|
||||
<listitem><para>Slice units automatically gain dependencies of type
|
||||
<varname>After=</varname> and <varname>Requires=</varname> on
|
||||
their immediate parent slice unit.</para></listitem>
|
||||
</itemizedlist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Default Dependencies</title>
|
||||
|
||||
<para>The following dependencies are added unless <varname>DefaultDependencies=no</varname> is set:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem><para>Slice units will automatically 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 late system shutdown should disable
|
||||
<varname>DefaultDependencies=</varname> option.</para></listitem>
|
||||
</itemizedlist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
|
@ -97,16 +97,7 @@
|
||||
<filename>foo@.service</filename> must exist from which services
|
||||
are instantiated for each incoming connection.</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
|
||||
implicit <varname>WantedBy=</varname> or
|
||||
<para>No implicit <varname>WantedBy=</varname> or
|
||||
<varname>RequiredBy=</varname> dependency from the socket to the
|
||||
service is added. This means that the service may be started
|
||||
without the socket, in which case it must be able to open sockets
|
||||
@ -130,31 +121,24 @@
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Automatic Dependencies</title>
|
||||
<title>Implicit Dependencies</title>
|
||||
|
||||
<para>Socket units automatically gain a <varname>Before=</varname>
|
||||
dependency on the service units they activate.</para>
|
||||
<para>The following dependencies are implicitly added:</para>
|
||||
|
||||
<para>Socket units referring to file system paths (such as AF_UNIX
|
||||
sockets or FIFOs) implicitly gain <varname>Requires=</varname> and
|
||||
<varname>After=</varname> dependencies on all mount units
|
||||
necessary to access those paths.</para>
|
||||
<itemizedlist>
|
||||
<listitem><para>Socket units automatically gain a <varname>Before=</varname>
|
||||
dependency on the service units they activate.</para></listitem>
|
||||
|
||||
<para>Socket units using the <varname>BindToDevice=</varname>
|
||||
setting automatically gain a <varname>BindsTo=</varname> and
|
||||
<varname>After=</varname> dependency on the device unit
|
||||
encapsulating the specified network interface.</para>
|
||||
<listitem><para>Socket units referring to file system paths (such as AF_UNIX
|
||||
sockets or FIFOs) implicitly gain <varname>Requires=</varname> and
|
||||
<varname>After=</varname> dependencies on all mount units
|
||||
necessary to access those paths.</para></listitem>
|
||||
|
||||
<para>If <varname>DefaultDependencies=yes</varname> is set (the
|
||||
default), socket units automatically gain a
|
||||
<varname>Before=</varname> dependency on
|
||||
<filename>sockets.target</filename>. They also gain a pair of
|
||||
<varname>After=</varname> and <varname>Requires=</varname>
|
||||
dependency on <filename>sysinit.target</filename>, and a pair of
|
||||
<varname>Before=</varname> and <varname>Conflicts=</varname>
|
||||
dependencies on <filename>shutdown.target</filename>. These
|
||||
dependencies ensure that the socket unit is started before normal
|
||||
services at boot, and is stopped on shutdown.</para>
|
||||
<listitem><para>Socket units using the <varname>BindToDevice=</varname>
|
||||
setting automatically gain a <varname>BindsTo=</varname> and
|
||||
<varname>After=</varname> dependency on the device unit
|
||||
encapsulating the specified network interface.</para></listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para>Additional implicit dependencies may be added as result of
|
||||
execution and resource control parameters as documented in
|
||||
@ -163,6 +147,29 @@
|
||||
<citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Default Dependencies</title>
|
||||
|
||||
<para>The following dependencies are added unless
|
||||
<varname>DefaultDependencies=no</varname> is set:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem><para>Socket units automatically gain a
|
||||
<varname>Before=</varname> dependency on
|
||||
<filename>sockets.target</filename>.</para></listitem>
|
||||
|
||||
<listitem><para>Socket units automatically gain a pair of
|
||||
<varname>After=</varname> and <varname>Requires=</varname>
|
||||
dependency on <filename>sysinit.target</filename>, and a pair of
|
||||
<varname>Before=</varname> and <varname>Conflicts=</varname>
|
||||
dependencies on <filename>shutdown.target</filename>. These
|
||||
dependencies ensure that the socket unit is started before normal
|
||||
services at boot, and is stopped on shutdown. Only sockets
|
||||
involved with early boot or late system shutdown should disable
|
||||
<varname>DefaultDependencies=</varname> option.</para></listitem>
|
||||
</itemizedlist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Options</title>
|
||||
|
||||
@ -358,7 +365,7 @@
|
||||
specified network interfaces. This controls the
|
||||
SO_BINDTODEVICE socket option (see <citerefentry
|
||||
project='man-pages'><refentrytitle>socket</refentrytitle><manvolnum>7</manvolnum></citerefentry>
|
||||
for details). If this option is used, an automatic dependency
|
||||
for details). If this option is used, an implicit dependency
|
||||
from this socket unit on the network interface device unit
|
||||
(<citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||
is created. Note that setting this parameter might result in
|
||||
|
@ -87,17 +87,16 @@
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Automatic Dependencies</title>
|
||||
<title>Implicit Dependencies</title>
|
||||
|
||||
<para>All swap units automatically get the
|
||||
<varname>BindsTo=</varname> and <varname>After=</varname>
|
||||
dependencies on the device units or the mount units of the files
|
||||
they are activated from.</para>
|
||||
<para>The following dependencies are implicitly added:</para>
|
||||
|
||||
<para>Swap units with <varname>DefaultDependencies=</varname> set to its default <option>yes</option> value in the
|
||||
<literal>[Unit]</literal> section enabled implicitly acquire a <varname>Conflicts=</varname> and a
|
||||
<varname>Before=</varname> dependency on <filename>umount.target</filename> so that they are deactivated at
|
||||
shutdown as well as a <varname>Before=swap.target</varname> dependency.</para>
|
||||
<itemizedlist>
|
||||
<listitem><para>All swap units automatically get the
|
||||
<varname>BindsTo=</varname> and <varname>After=</varname>
|
||||
dependencies on the device units or the mount units of the files
|
||||
they are activated from.</para></listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para>Additional implicit dependencies may be added as result of
|
||||
execution and resource control parameters as documented in
|
||||
@ -106,6 +105,18 @@
|
||||
<citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Default Dependencies</title>
|
||||
|
||||
<para>The following dependencies are added unless <varname>DefaultDependencies=no</varname> is set:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem><para>Swap units automatically acquire a <varname>Conflicts=</varname> and a
|
||||
<varname>Before=</varname> dependency on <filename>umount.target</filename> so that they are deactivated at
|
||||
shutdown as well as a <varname>Before=swap.target</varname> dependency.</para></listitem>
|
||||
</itemizedlist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title><filename>fstab</filename></title>
|
||||
|
||||
|
@ -80,22 +80,29 @@
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Automatic Dependencies</title>
|
||||
<title>Implicit Dependencies</title>
|
||||
|
||||
<para>Unless <varname>DefaultDependencies=</varname> is set to
|
||||
<option>no</option> in either of related units or an explicit ordering
|
||||
dependency is already defined, target units will implicitly complement all
|
||||
configured dependencies of type <varname>Wants=</varname> or
|
||||
<varname>Requires=</varname> with dependencies of type
|
||||
<varname>After=</varname>. Note that <varname>Wants=</varname> or
|
||||
<varname>Requires=</varname> must be defined in the target unit itself — if
|
||||
you for example define <varname>Wants=</varname>some.target in
|
||||
some.service, the implicit ordering will not be added.</para>
|
||||
<para>There are no implicit dependencies for target units.</para>
|
||||
</refsect1>
|
||||
|
||||
<para>All target units automatically gain <varname>Conflicts=</varname>
|
||||
dependency against shutdown.target unless <varname>DefaultDependencies=</varname>
|
||||
is set to <option>no</option>.</para>
|
||||
<refsect1>
|
||||
<title>Default Dependencies</title>
|
||||
|
||||
<para>The following dependencies are added unless
|
||||
<varname>DefaultDependencies=no</varname> is set:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem><para>Target units will automatically complement all
|
||||
configured dependencies of type <varname>Wants=</varname> or
|
||||
<varname>Requires=</varname> with dependencies of type
|
||||
<varname>After=</varname>. Note that <varname>Wants=</varname> or
|
||||
<varname>Requires=</varname> must be defined in the target unit itself — if
|
||||
you for example define <varname>Wants=</varname>some.target in
|
||||
some.service, the automatic ordering will not be added.</para></listitem>
|
||||
|
||||
<listitem><para>Target units automatically gain <varname>Conflicts=</varname>
|
||||
dependency against <filename>shutdown.target</filename>.</para></listitem>
|
||||
</itemizedlist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
|
@ -82,20 +82,34 @@
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Automatic Dependencies</title>
|
||||
<title>Implicit Dependencies</title>
|
||||
|
||||
<para>Timer units automatically gain a <varname>Before=</varname>
|
||||
dependency on the service they are supposed to activate.</para>
|
||||
<para>The following dependencies are implicitly added:</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>time-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>
|
||||
<itemizedlist>
|
||||
<listitem><para>Timer units automatically gain a <varname>Before=</varname>
|
||||
dependency on the service they are supposed to activate.</para></listitem>
|
||||
</itemizedlist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Default Dependencies</title>
|
||||
|
||||
<para>The following dependencies are added unless <varname>DefaultDependencies=no</varname> is set:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem><para>Timer units will automatically 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. Only timer
|
||||
units involved with early boot or late system shutdown should disable the
|
||||
<varname>DefaultDependencies=</varname> option.</para></listitem>
|
||||
|
||||
<listitem><para>Timer units
|
||||
with at least one <varname>OnCalendar=</varname> directive will have an additional <varname>After=</varname>
|
||||
dependency on <filename>time-sync.target</filename> to avoid being started before the system clock has been
|
||||
correctly set.</para></listitem>
|
||||
</itemizedlist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
|
@ -209,6 +209,12 @@
|
||||
<!-- Note that we do not document .include here, as we consider it mostly obsolete, and want
|
||||
people to use .d/ drop-ins instead. -->
|
||||
|
||||
<para>Note that while systemd offers a flexible dependency system
|
||||
between units it is recommended to use this functionality only
|
||||
sparingly and instead rely on techniques such as bus-based or
|
||||
socket-based activation which make dependencies implicit,
|
||||
resulting in a both simpler and more flexible system.</para>
|
||||
|
||||
<para>Some unit names reflect paths existing in the file system
|
||||
namespace. Example: a device unit
|
||||
<filename>dev-sda.device</filename> refers to a device with the
|
||||
@ -262,30 +268,41 @@
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Automatic Dependencies</title>
|
||||
<title>Implicit Dependencies</title>
|
||||
|
||||
<para>Note that while systemd offers a flexible dependency system
|
||||
between units it is recommended to use this functionality only
|
||||
sparingly and instead rely on techniques such as bus-based or
|
||||
socket-based activation which make dependencies implicit,
|
||||
resulting in a both simpler and more flexible system.</para>
|
||||
<para>A number of unit dependencies are implicitly established,
|
||||
depending on unit type and unit configuration. These implicit
|
||||
dependencies can make unit configuration file cleaner. For the
|
||||
implicit dependencies in each unit type, please refer to
|
||||
section "Implicit Dependencies" in respective man pages.</para>
|
||||
|
||||
<para>A number of unit dependencies are automatically established,
|
||||
depending on unit configuration. On top of that, for units with
|
||||
<varname>DefaultDependencies=yes</varname> (the default) a couple
|
||||
of additional dependencies are added. The precise effect of
|
||||
<varname>DefaultDependencies=yes</varname> depends on the unit
|
||||
type (see below).</para>
|
||||
|
||||
<para>If <varname>DefaultDependencies=yes</varname> is set, units
|
||||
that are referenced by other units of type
|
||||
<filename>.target</filename> via a <varname>Wants=</varname> or
|
||||
<varname>Requires=</varname> dependency might automatically gain
|
||||
an <varname>Before=</varname> dependency too. See
|
||||
<citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||
<para>For example, service units with <varname>Type=dbus</varname>
|
||||
automatically acquire dependencies of type <varname>Requires=</varname>
|
||||
and <varname>After=</varname> on <filename>dbus.socket</filename>. See
|
||||
<citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||
for details.</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Default Dependencies</title>
|
||||
|
||||
<para>Default dependencies are similar to implicit dependencies,
|
||||
but can be turned on and off by setting
|
||||
<varname>DefaultDependencies=</varname> to <varname>yes</varname>
|
||||
(the default) and <varname>no</varname>, while implicit dependencies
|
||||
are always in effect. See section "Default Dependencies" in respective
|
||||
man pages for the effect of enabling
|
||||
<varname>DefaultDependencies=</varname> in each unit types.</para>
|
||||
|
||||
<para>For example, target units will complement all configured
|
||||
dependencies of type type <varname>Wants=</varname> or
|
||||
<varname>Requires=</varname> with dependencies of type
|
||||
<varname>After=</varname>. See
|
||||
<citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||
for details. Note that this behavior can be turned off by setting
|
||||
<varname>DefaultDependencies=no</varname>.</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Unit File Load Path</title>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user