|
Zbigniew Jędrzejewski-Szmek |
d66047 |
From 06c5b7a9f3d47834ea4dbbfb24f169b6893dd338 Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
Date: Sat, 30 Nov 2013 21:23:01 -0500
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
Subject: [PATCH] man: explicitly say when multiple units can be specified
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
itistoday> how do you specify multiple dependencies in a unit file? i've been
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
googling and can't find this basic thing :-\
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
itistoday> do you use a comma, or use multiple After= statements?
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
man/systemd.unit.xml | 128 ++++++++++++++++++++++++++++-----------------------
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
1 file changed, 70 insertions(+), 58 deletions(-)
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
index 5c8b8e8..029392c 100644
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
--- a/man/systemd.unit.xml
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+++ b/man/systemd.unit.xml
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
@@ -410,10 +410,12 @@
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
of the other units gets deactivated or
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
its activation fails, this unit will
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
be deactivated. This option may be
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- specified more than once, in which
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- case requirement dependencies for all
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- listed names are created. Note that
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- requirement dependencies do not
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ specified more than once or multiple
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ space-separated units may be specified
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ in one option in which case
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ requirement dependencies for all
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ listed names will be created. Note
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ that requirement dependencies do not
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
influence the order in which services
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
are started or stopped. This has to be
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
configured independently with the
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
@@ -476,22 +478,23 @@
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
<term><varname>RequisiteOverridable=</varname></term>
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
<listitem><para>Similar to
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- <varname>Requires=</varname>
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- and <varname>RequiresOverridable=</varname>, respectively. However,
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- if a unit listed here is not started
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- already it will not be started and the
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- transaction fails
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- immediately.</para></listitem>
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ <varname>Requires=</varname> and
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ <varname>RequiresOverridable=</varname>,
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ respectively. However, if the units
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ listed here are not started already
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ they will not be started and the
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ transaction will fail immediately.
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ </para></listitem>
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
</varlistentry>
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
<varlistentry>
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
<term><varname>Wants=</varname></term>
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
<listitem><para>A weaker version of
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- <varname>Requires=</varname>. A unit
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ <varname>Requires=</varname>. Units
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
listed in this option will be started
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
if the configuring unit is. However,
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- if the listed unit fails to start up
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ if the listed units fail to start
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
or cannot be added to the transaction
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
this has no impact on the validity of
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
the transaction as a whole. This is
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
@@ -501,8 +504,8 @@
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
<para>Note that dependencies of this
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
type may also be configured outside of
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- the unit configuration file by
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- adding a symlink to a
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ the unit configuration file by adding
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ symlinks to a
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
<filename>.wants/</filename> directory
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
accompanying the unit file. For
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
details see above.</para></listitem>
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
@@ -534,7 +537,7 @@
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
of units. When systemd stops or restarts
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
the units listed here, the action is
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
propagated to this unit.
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- Note that this is a one way dependency -
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ Note that this is a one way dependency —
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
changes to this unit do not affect the
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
listed units.
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
</para></listitem>
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
@@ -543,12 +546,12 @@
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
<varlistentry>
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
<term><varname>Conflicts=</varname></term>
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- <listitem><para>Configures negative
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ <listitem><para>A space-separated list
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ of unit names. Configures negative
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
requirement dependencies. If a unit
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- has a
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- <varname>Conflicts=</varname> setting
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- on another unit, starting the former
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- will stop the latter and vice
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ has a <varname>Conflicts=</varname>
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ setting on another unit, starting the
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ former will stop the latter and vice
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
versa. Note that this setting is
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
independent of and orthogonal to the
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
<varname>After=</varname> and
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
@@ -575,7 +578,8 @@
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
<term><varname>Before=</varname></term>
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
<term><varname>After=</varname></term>
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- <listitem><para>Configures ordering
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ <listitem><para>A space-separated list
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ of unit names. Configures ordering
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
dependencies between units. If a unit
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
<filename>foo.service</filename>
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
contains a setting
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
@@ -624,18 +628,18 @@
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
type <varname>After=</varname> or
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
<varname>Before=</varname>. If two
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
units have no ordering dependencies
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- between them, they are shut down
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- or started up simultaneously, and
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- no ordering takes
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ between them, they are shut down or
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ started up simultaneously, and no
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ ordering takes
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
place. </para></listitem>
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
</varlistentry>
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
<varlistentry>
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
<term><varname>OnFailure=</varname></term>
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- <listitem><para>Lists one or more
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- units that are activated when this
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- unit enters the
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ <listitem><para>A space-separated list
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ of one or more units that are
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ activated when this unit enters the
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
<literal>failed</literal>
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
state.</para></listitem>
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
</varlistentry>
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
@@ -644,16 +648,17 @@
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
<term><varname>PropagatesReloadTo=</varname></term>
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
<term><varname>ReloadPropagatedFrom=</varname></term>
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- <listitem><para>Lists one or more
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- units where reload requests on the
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- unit will be propagated to/on the
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- other unit will be propagated
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- from. Issuing a reload request on a
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- unit will automatically also enqueue a
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- reload request on all units that the
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- reload request shall be propagated to
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- via these two
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- settings.</para></listitem>
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ <listitem><para>A space-separated list
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ of one or more units where reload
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ requests on this unit will be
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ propagated to, or reload requests on
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ the other unit will be propagated to
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ this unit, respectively. Issuing a
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ reload request on a unit will
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ automatically also enqueue a reload
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ request on all units that the reload
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ request shall be propagated to via
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ these two settings.</para></listitem>
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
</varlistentry>
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
<varlistentry>
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
@@ -1089,32 +1094,34 @@
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
<varlistentry>
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
<term><varname>Alias=</varname></term>
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- <listitem><para>Additional names this
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- unit shall be installed under. The
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- names listed here must have the same
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- suffix (i.e. type) as the unit file
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- name. This option may be specified
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- more than once, in which case all
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- listed names are used. At installation
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- time,
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- <command>systemctl enable</command>
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- will create symlinks from these names
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- to the unit filename.</para></listitem>
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ <listitem><para>A space-seperated list
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ of additional names this unit shall be
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ installed under. The names listed here
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ must have the same suffix (i.e. type)
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ as the unit file name. This option may
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ be specified more than once, in which
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ case all listed names are used. At
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ installation time, <command>systemctl
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ enable</command> will create symlinks
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ from these names to the unit
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ filename.</para></listitem>
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
</varlistentry>
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
<varlistentry>
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
<term><varname>WantedBy=</varname></term>
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
<term><varname>RequiredBy=</varname></term>
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- <listitem><para>A symbolic link is
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- created in the
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- <filename>.wants/</filename> or
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- <filename>.requires/</filename> directory
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- of the listed unit when this unit is
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- activated by <command>systemctl
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- enable</command>. This has the effect
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- that a dependency of type
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- <varname>Wants=</varname> or
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ <listitem><para>This option may be
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ used more than once, or a
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ space-separated list of unit names may
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ be given. A symbolic link is created
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ in the <filename>.wants/</filename> or
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ <filename>.requires/</filename>
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ directory of each of the listed units
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ when this unit is installed by
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ <command>systemctl enable</command>.
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ This has the effect that a dependency
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ of type <varname>Wants=</varname> or
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
<varname>Requires=</varname> is added
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
from the listed unit to the current
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
unit. The primary result is that the
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
@@ -1160,7 +1167,12 @@
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
and <command>systemctl
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
disable</command> will automatically
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
install/uninstall units listed in this option as
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
- well.</para></listitem>
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ well.</para>
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ <para>This option may be used more
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ than once, or a space-separated list
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ of unit names may be
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
+ given.</para></listitem>
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
</varlistentry>
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
</variablelist>
|
|
Zbigniew Jędrzejewski-Szmek |
d66047 |
|