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