ryantimwilson / rpms / systemd

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