[systemd-commits] man/systemd.unit.xml

Zbigniew Jędrzejewski-Szmek zbyszek at kemper.freedesktop.org
Sat Jul 13 20:37:21 PDT 2013


 man/systemd.unit.xml |   45 ++++++++++++++++++++++++++++++++++++---------
 1 file changed, 36 insertions(+), 9 deletions(-)

New commits:
commit 3eb1395706ca0a00ac15d59098a0250b0377e6b5
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Sat Jul 13 23:36:39 2013 -0400

    man: tweak WantedBy=/RequiredBy= description a bit
    
    https://bugs.freedesktop.org/show_bug.cgi?id=55663

diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml
index a870f6b..a14e452 100644
--- a/man/systemd.unit.xml
+++ b/man/systemd.unit.xml
@@ -1115,19 +1115,46 @@
                                 <term><varname>WantedBy=</varname></term>
                                 <term><varname>RequiredBy=</varname></term>
 
-                                <listitem><para>Installs a symlink in
-                                the <filename>.wants/</filename>
-                                or <filename>.requires/</filename>
-                                subdirectory for a unit, respectively. This has the
-                                effect that when the listed unit name
-                                is activated the unit listing it is
-                                activated
-                                too. <command>WantedBy=foo.service</command>
+                                <listitem><para>A symbolic link is
+                                created in the
+                                <filename>.wants/</filename> or
+                                <filename>.requires/</filename> folder
+                                of the listed unit when this unit is
+                                activated by <command>systemctl
+                                enable</command>.  This has the effect
+                                that a dependency of type
+                                <varname>Wants=</varname> or
+                                <varname>Requires=</varname> is added
+                                from the listed unit to the current
+                                unit. The primary result is that the
+                                current unit will be started when the
+                                listed unit is started. See the
+                                description of
+                                <varname>Wants=</varname> and
+                                <varname>Requires=</varname> in the
+                                [Unit] section for details.</para>
+
+                                <para><command>WantedBy=foo.service</command>
                                 in a service
                                 <filename>bar.service</filename> is
                                 mostly equivalent to
                                 <command>Alias=foo.service.wants/bar.service</command>
-                                in the same file.</para></listitem>
+                                in the same file. In case of template
+                                units, <command>systemctl enable</command>
+                                must be called with an instance name, and
+                                this instance will be added to the
+                                <filename>.wants/</filename> or
+                                <filename>.requires/</filename> list
+                                of the listed unit.
+                                E.g. <command>WantedBy=getty.target</command>
+                                in a service
+                                <filename>getty at .service</filename>
+                                will result in <command>systemctl
+                                enable getty at tty2.service</command>
+                                creating a
+                                <filename>getty.target.wants/getty at tty2.service</filename>
+                                link to <filename>getty at .service</filename>.
+                                </para></listitem>
                         </varlistentry>
 
                         <varlistentry>



More information about the systemd-commits mailing list