chiark / gitweb /
man: clarify 'config file stack'
[elogind.git] / udev / udev.xml
index 48980577c08fbd80a6778535126f6e5fb0454dd7..ab82012cee8a92d2c12fa04db0397f86132f621b 100644 (file)
 
     <refsect2><title>Rules files</title>
       <para>The udev rules are read from the files located in the
-      default rules directory <filename>/lib/udev/rules.d/</filename>,
-      the custom rules directory <filename>/etc/udev/rules.d/</filename>
-      and the temporary rules directory <filename>/run/udev/rules.d/</filename>.
-      All rule files are collectively sorted and processed in lexical order,
-      regardless of the directories in which they live. However, files in
-      <filename>/etc/udev/rules.d/</filename> take precedence over files with
-      the same name in <filename>/lib/udev/rules.d/</filename>; this can be
-      used to ignore a default rules file if needed.</para>
+      system rules directory <filename>/lib/udev/rules.d/</filename>,
+      the local administration directory <filename>/etc/udev/rules.d/</filename>
+      and the volatile runtime directory <filename>/run/udev/rules.d/</filename>.
+      All rules files are collectively sorted and processed in lexical order,
+      regardless of the directories in which they live. However, files with
+      identical file names replace each other. Files in <filename>/run</filename>
+      have the highest priority, files in <filename>/etc</filename> take precedence
+      over files with the same name in <filename>/lib</filename>. This can be
+      used to overwrite a system rules file if needed; a symlink in
+      <filename>/etc</filename> with the same name as a rules file in
+      <filename>/lib</filename>, pointing to <filename>/dev/null</filename>,
+      disables the rules file entirely.</para>
 
       <para>Rule files must have the extension <filename>.rules</filename>; other
       extensions are ignored.</para>
           </listitem>
         </varlistentry>
 
+        <varlistentry>
+          <term><option>TAGS</option></term>
+          <listitem>
+            <para>Search the devpath upwards for a device with matching tag.</para>
+          </listitem>
+        </varlistentry>
+
         <varlistentry>
           <term><option>ENV{<replaceable>key</replaceable>}</option></term>
           <listitem>
                 </listitem>
               </varlistentry>
             </variablelist>
-            <para>If no option is given, udev chooses between <option>program</option>
-            and <option>file</option> based on the executable bit of the file
-            permissions.</para>
           </listitem>
         </varlistentry>
 
               <varlistentry>
                 <term><option>watch</option></term>
                 <listitem>
-                  <para>Watch the device node with inotify; when closed after being opened for
-                  writing, a change uevent is synthesised.</para>
+                  <para>Watch the device node with inotify; when the node is closed after being opened for
+                  writing, a change uevent is synthesized.</para>
                 </listitem>
               </varlistentry>
               <varlistentry>
 
       <para>The <option>NAME</option>, <option>SYMLINK</option>, <option>PROGRAM</option>,
       <option>OWNER</option>, <option>GROUP</option>, <option>MODE</option>  and  <option>RUN</option>
-      fields support simple printf-like string substitutions. The <option>RUN</option>
-      format chars gets applied after all rules have been processed, right before the program
-      is executed. It allows the use of device properties set by earlier matching
-      rules. For all other fields, substitutions are applied while the individual rule is
+      fields support simple string substitutions. The <option>RUN</option>
+      substitutions are performed after all rules have been processed, right before the program
+      is executed, allowing for the use of device properties set by earlier matching
+      rules. For all other fields, substitutions are performed while the individual rule is
       being processed. The available substitutions are:</para>
       <variablelist>
         <varlistentry>
             <para>The value of a sysfs attribute found at the device where
             all keys of the rule have matched. If the matching device does not have
             such an attribute, and a previous KERNELS, SUBSYSTEMS, DRIVERS, or
-            ATTRS test selected a parent device, use the attribute from that
-            parent device.
-            If the attribute is a symlink, the last element of the symlink target is
+            ATTRS test selected a parent device, then the attribute from that
+            parent device is used.</para>
+            <para>If the attribute is a symlink, the last element of the symlink target is
             returned as the value.</para>
           </listitem>
         </varlistentry>
           <term><option>$result</option>, <option>%c</option></term>
           <listitem>
             <para>The string returned by the external program requested with PROGRAM.
-            A single part of the string, separated by a space character may be selected
+            A single part of the string, separated by a space character, may be selected
             by specifying the part number as an attribute: <option>%c{N}</option>.
-            If the number is followed by the '+' char this part plus all remaining parts
+            If the number is followed by the '+' character, this part plus all remaining parts
             of the result string are substituted: <option>%c{N+}</option></para>
           </listitem>
         </varlistentry>
         <varlistentry>
           <term><option>$links</option></term>
           <listitem>
-            <para>The current list of symlinks, separated by a space character. The value is
-            only set if an earlier rule assigned a value, or during a remove events.</para>
+            <para>A space-separated list of the current symlinks. The value is
+            only set during a remove event or if an earlier rule assigned a value.</para>
           </listitem>
         </varlistentry>
 
         <varlistentry>
           <term><option>$tempnode</option>, <option>%N</option></term>
           <listitem>
-            <para>The name of a created temporary device node to provide access to
+            <para>The name of a temporary device node created to provide access to
             the device from a external program before the real node is created.</para>
           </listitem>
         </varlistentry>