a52f674
From 0036c02a84e5322f2ee57a728c478c00097a6c3c Mon Sep 17 00:00:00 2001
b12ff75
From: Lennart Poettering <lennart@poettering.net>
b12ff75
Date: Wed, 11 Dec 2013 18:38:51 +0100
b12ff75
Subject: [PATCH] man: explain in more detail how SYSTEMD_READY= influences
b12ff75
 SYSTEMD_WANTS= in udev rules
b12ff75
b12ff75
https://bugzilla.redhat.com/show_bug.cgi?id=1026860
a52f674
(cherry picked from commit 419173e60a05424008fcd312f6df4b59b2ce8e62)
b12ff75
---
b12ff75
 man/systemd.device.xml | 45 +++++++++++++++++++++++++++++++--------------
b12ff75
 1 file changed, 31 insertions(+), 14 deletions(-)
b12ff75
b12ff75
diff --git a/man/systemd.device.xml b/man/systemd.device.xml
b12ff75
index 96ebe89..002b647 100644
b12ff75
--- a/man/systemd.device.xml
b12ff75
+++ b/man/systemd.device.xml
b12ff75
@@ -70,12 +70,15 @@
b12ff75
                 since no device-specific options may be
b12ff75
                 configured.</para>
b12ff75
 
b12ff75
-                <para>systemd will automatically create dynamic device
b12ff75
-                units for all kernel devices that are marked with the
b12ff75
-                "systemd" udev tag (by default all block and network
b12ff75
-                devices, and a few others). This may be used to define
b12ff75
-                dependencies between devices and other
b12ff75
-                units.</para>
b12ff75
+                <para>systemd will dynamically create device units for
b12ff75
+                all kernel devices that are marked with the "systemd"
b12ff75
+                udev tag (by default all block and network devices,
b12ff75
+                and a few others). This may be used to define
b12ff75
+                dependencies between devices and other units. To tag a
b12ff75
+                udev device use <literal>TAG+="systemd"</literal> in
b12ff75
+                the udev rules file, see
b12ff75
+                <citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry>
b12ff75
+                for details.</para>
b12ff75
 
b12ff75
                 <para>Device units are named after the
b12ff75
                 <filename>/sys</filename> and
b12ff75
@@ -93,7 +96,7 @@
b12ff75
 
b12ff75
                 <para>The settings of device units may either be
b12ff75
                 configured via unit files, or directly from the udev
b12ff75
-                database (which is recommended). The following udev
b12ff75
+                database (which is recommended). The following udev device
b12ff75
                 properties are understood by systemd:</para>
b12ff75
 
b12ff75
                 <variablelist class='udev-directives'>
b12ff75
@@ -101,16 +104,26 @@
b12ff75
                                 <term><varname>SYSTEMD_WANTS=</varname></term>
b12ff75
                                 <listitem><para>Adds dependencies of
b12ff75
                                 type <varname>Wants</varname> from
b12ff75
-                                this unit to all listed units. This
b12ff75
+                                the device unit to all listed units. This
b12ff75
                                 may be used to activate arbitrary
b12ff75
-                                units, when a specific device becomes
b12ff75
+                                units when a specific device becomes
b12ff75
                                 available. Note that this and the
b12ff75
                                 other tags are not taken into account
b12ff75
                                 unless the device is tagged with the
b12ff75
                                 <literal>systemd</literal> string in
b12ff75
                                 the udev database, because otherwise
b12ff75
                                 the device is not exposed as systemd
b12ff75
-                                unit.</para></listitem>
b12ff75
+                                unit (see above). Note that systemd
b12ff75
+                                will only act on
b12ff75
+                                <varname>Wants</varname> dependencies
b12ff75
+                                when a device first becomes active, it
b12ff75
+                                will not act on them if they are added
b12ff75
+                                to devices that are already
b12ff75
+                                active. Use
b12ff75
+                                <varname>SYSTEMD_READY=</varname> (see
b12ff75
+                                below) to influence on which udev
b12ff75
+                                event to trigger the device
b12ff75
+                                dependencies.</para></listitem>
b12ff75
                         </varlistentry>
b12ff75
 
b12ff75
                         <varlistentry>
b12ff75
@@ -135,10 +148,14 @@
b12ff75
                                 device disappears from the udev
b12ff75
                                 tree. This option is useful to support
b12ff75
                                 devices that initially show up in an
b12ff75
-                                uninitialized state in the tree, and for
b12ff75
-                                which a changed event is generated the
b12ff75
-                                moment they are fully set
b12ff75
-                                up.</para></listitem>
b12ff75
+                                uninitialized state in the tree, and
b12ff75
+                                for which a <literal>changed</literal>
b12ff75
+                                event is generated the moment they are
b12ff75
+                                fully set up. Note that
b12ff75
+                                <varname>SYSTEMD_WANTS=</varname> (see
b12ff75
+                                above) is not acted on as long as
b12ff75
+                                <varname>SYSTEMD_READY=0</varname> is
b12ff75
+                                set for a device.</para></listitem>
b12ff75
                         </varlistentry>
b12ff75
 
b12ff75
                         <varlistentry>