X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=docs%2Fudev.xml;h=e0542a6be199048f024550dd784835bb17a47a6a;hp=02dcd2586a8173939d55f0341a8bc9e74f6d195d;hb=864412e02df16555c02da9ccb0a67fddb6628acd;hpb=7b86ada7d4a6b2597299912964d1b8da3d059691
diff --git a/docs/udev.xml b/docs/udev.xml
index 02dcd2586..e0542a6be 100644
--- a/docs/udev.xml
+++ b/docs/udev.xml
@@ -27,7 +27,7 @@
udev
- 8
+ 7
@@ -42,9 +42,7 @@
Usually udev runs as udevd8 and receives uevents directly from the
- kernel if a device is added or removed form the system. The program
- udev itself may be used as an event handler in situations,
- where running the daemon is not appropriate, like in initramfs.
+ kernel if a device is added or removed form the system.
If udev receives a device event, it matches its configured rules
against the available device attributes provided in sysfs to identify the device.
@@ -55,7 +53,7 @@
CONFIGURATIONAll udev configuration files are placed in /etc/udev/*.
- Every file consist of a set of lines of text. All empty lines or lines beginning
+ Every file consists of a set of lines of text. All empty lines or lines beginning
with '#' will be ignored.Configuration file
@@ -71,14 +69,6 @@
-
-
-
- The name and location of the udev database. The default value is
- /dev/.udevdb.
-
-
-
@@ -158,66 +148,68 @@
- Match the kernel action name.
+ Match the name of the event action.
- Match the kernel device name
+ Match the name of the device.
- Match the kernel devpath.
+ Match the devpath of the device.
- Match the kernel subsystem name
+ Match the subsystem of the device.
- Match the typ of bus the device is connected to.
+ Search the devpath upwards for a matching device subsystem name.
- Match the kernel driver name.
+ Search the devpath upwards for a matching device driver name.
- Match the device number on the bus.
+ Search the devpath upwards for a matching device name.
-
+
- Match against the value of an environment key. Depending on
- the specified operation, this key is also used as a assignment.
+ Search the devpath upwards for a device with matching sysfs attribute values.
+ Up to five keys can be specified per rule. All attributes
+ 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.
-
+
- Match the sysfs attribute value. Up to five values can be specified.
- Trailing whitespace is ignored, if the specified match value does not contain
- trailing whitespace itself.
+ Match against the value of an environment variable. Up to five
+ keys can be specified per rule. This key can also be used to export a variable to
+ the environment.
@@ -273,8 +265,8 @@
- The name of the node to be created, or the name, the network interface
- should be renamed to. Only one rule can set the a name, all later rules with
+ The name of the node to be created, or the name the network interface
+ should be renamed to. Only one rule can set the node name, all later rules with
a NAME key will be ignored.
@@ -292,7 +284,7 @@
- The permissions for the device node. Every specified value over writes
+ The permissions for the device node. Every specified value overwrites
the compiled-in default value.
@@ -300,8 +292,8 @@
- Export the key to the environment. Depending on the specified
- operation, this key is also used as a match.
+ Export a variable to the environment. This key can also be used to match
+ against an environment variable.
@@ -330,7 +322,7 @@
- Import the printed result or the content of a file in environment key
+ Import the printed result or the value of a file in environment key
format into the event environment. will execute an
external program and read its output. will inport a
text file. If no option is given, udev will determine it from the executable
@@ -341,8 +333,8 @@
- Wait for the specified sysfs file of the device to be created. May be used
- to fight agains timing issues wth the kernel.
+ Wait for the specified sysfs file of the device to be created. Can be used
+ to fight against kernel sysfs timing issues.
@@ -361,68 +353,74 @@
The , , ,
- and fields support simple
- printf-like string substitutions:
+ , and
+ fields support simple printf-like string substitutions. The
+ format chars gets applied after all rules have been processed, right before the program
+ is executed. It allows the use of the complete environment set by earlier matching
+ rules. For all other fields, substitutions are applied while the individual rule is
+ being processed. The available substitutions are:
- ,
+ , The kernel name for this device.
- ,
+ ,
- The kernel bus id for this device.
+ The kernel number for this device. For example, 'sda3' has
+ kernel number of '3'
- ,
+ ,
- The kernel number for this device. For example, 'sda3' has
- kernel number of '3'
+ The devpath of the device.
- ,
+ ,
- The devpath of the device.
+ The name of the device matched while searching the devpath upwards for
+ , and .
+
- ,
+ ,
- The content of a sysfs attribute.
+ The value of a sysfs attribute found at the current or a parent device.
- ,
+ , The value of an environment variable.
- ,
+ , The kernel major number for the device.
-
+ The kernel minor number for the device.
- ,
+ , The string returned by the external program requested with PROGRAM.
A single part of the string, separated by a space character may be selected
@@ -433,33 +431,21 @@
- ,
-
- If a device node already exists with the name, the smallest next free
- number is used. This can be used to create compatibility symlinks and enumerate
- devices of the same type originating from different kernel subsystems.
- Note: The use of the enumeration facility is unreliable for events that
- request a number at the same time. The use of enumerations in todays setups
- where devices can come and go at any time is not recomended.
-
-
-
-
- ,
+ , The node name of the parent device.
- ,
+ , The udev_root value.
- ,
+ , The name of a created temporary device node to provide access to
the device from a external program before the real node is created.
@@ -528,14 +514,11 @@
SEE ALSO
- udev8
+ udevd8,
udevinfo8,
-
- udevd8
- ,
udevmonitor8