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