chiark / gitweb /
create_floppy_devices: apply specified mode without umask
[elogind.git] / udev.xml
index 852ae039e7117282ab5f0fae8d46ef8ef5317d07..bd099479f24a7f2eabdcf61a8052462a3ebcb9db 100644 (file)
--- a/udev.xml
+++ b/udev.xml
           value in the configuration file. Every line in the rules file contains at least
           one key value pair. There are two kind of keys, match and assignment keys.
           If all match keys are matching against its value, the rule gets applied and the
-          assign keys get the specified value assigned. A matching rule may specify the
-          name of the device node, add a symlink pointing to the node, or run a specified
-          program as part of the event handling. If no matching rule is found, the default
-          device node name is used.</para>
+          assign keys get the specified value assigned.</para>
+
+          <para>A matching rule may specify the name of the device node, add a symlink
+          pointing to the node, or run a specified program as part of the event handling.
+          If no matching rule is found, the default device node name is used.</para>
 
           <para>A rule may consists of a list of one or more key value pairs separated by
           a comma. Each key has a distinct operation, depending on the used operator. Valid
             </varlistentry>
           </variablelist>
 
-          <para>The following key names can be used to match against device properties:</para>
+          <para>The following key names can be used to match against device properties.
+          Some of the keys also match against properties of the parent devices in sysfs,
+          not only the device that has generated the event. If multiple keys that match
+          a parent device are specified in a single rule, all these keys must match at
+          one and the same parent device.</para>
           <variablelist>
             <varlistentry>
               <term><option>ACTION</option></term>
                 <para>Match the subsystem of the event device.</para>
               </listitem>
             </varlistentry>
-<!--
             <varlistentry>
               <term><option>DRIVER</option></term>
               <listitem>
-                <para>Match the driver name of the event device. Only set for devices created by a bus driver.</para>
+                <para>Match the driver name of the event device. Only set for devices
+                which are bound to a driver at the time the event is generated.</para>
               </listitem>
             </varlistentry>
--->
             <varlistentry>
               <term><option>ATTR{<replaceable>filename</replaceable>}</option></term>
               <listitem>
               <term><option>ATTRS{<replaceable>filename</replaceable>}</option></term>
               <listitem>
                 <para>Search the devpath upwards for a device with matching sysfs attribute values.
-                Up to five <option>ATTRS</option> keys can be specified per rule. All attributes
+                Up to five <option>ATTRS</option> keys can be specified per rule, but all of them
                 must match on the same device. Trailing whitespace in the attribute values is ignored,
                 if the specified match value does not contain trailing whitespace itself.</para>
               </listitem>
               <term><option>PROGRAM</option></term>
               <listitem>
                 <para>Execute external program. The key is true, if the program returns
-                without exit code zero. The whole event environment is available to the
-                executed program. The program's output printed to stdout is available for
+                with exit code zero. The whole event environment is available to the
+                executed program. The program's output printed to stdout, is available in
                 the RESULT key.</para>
               </listitem>
             </varlistentry>
             <varlistentry>
               <term><option>IMPORT{<replaceable>type</replaceable>}</option></term>
               <listitem>
-                <para>Import the printed result or the value of a file in environment key
-                format into the event environment. <option>program</option> will execute an
-                external program and read its output. <option>file</option> will import a
-                text file. If no option is given, udev will determine it from the  executable
-                bit of of the file permissions.</para>
+                <para>Import a set of variables into the event environment,
+                depending on <replaceable>type</replaceable>:</para>
+                <variablelist>
+                  <varlistentry>
+                    <term><option>program</option></term>
+                    <listitem>
+                      <para>Execute an external program specified as the assigned value and
+                      import its output, which must be in environment key format.</para>
+                    </listitem>
+                  </varlistentry>
+                  <varlistentry>
+                    <term><option>file</option></term>
+                    <listitem>
+                      <para>Import a text file specified as the assigned value, which must be in
+                      environment key format.</para>
+                    </listitem>
+                  </varlistentry>
+                  <varlistentry>
+                    <term><option>parent</option></term>
+                    <listitem>
+                      <para>Import the stored keys from the parent device by reading
+                      the database entry of the parent device. The value assigned to
+                      <option>IMPORT{parent}</option> is used as a filter of key names
+                      to import (with the same shell-style pattern matching used for
+                      comparisons).</para>
+                    </listitem>
+                  </varlistentry>
+                </variablelist>
+                <para>If no option is given, udev will choose between <option>program</option>
+                and <option>file</option> based on the executable bit of of the file
+                permissions.</para>
               </listitem>
             </varlistentry>