chiark / gitweb /
update Debian rules
[elogind.git] / udev.7
diff --git a/udev.7 b/udev.7
index eef10d4afb5b08c566c5fcf404eb82a6f3cded50..fa6e52fdf3f6a8fbd2e292ffa69277e5cc5cd68f 100644 (file)
--- a/udev.7
+++ b/udev.7
@@ -52,7 +52,7 @@ and
 .PP
 The udev rules are read from the files located in the
 \fI/etc/udev/rules.d\fR
-directory or at the location specified value in the configuraton file. Every line in the rules file contains at least one key value pair. There are two kind of keys, match and assignement 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.
+directory or at the location specified 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.
 .PP
 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 operators are:
 .TP 3n
@@ -76,33 +76,38 @@ The following key names can be used to match against device properties:
 \fBACTION\fR
 Match the name of the event action.
 .TP 3n
-\fBKERNEL\fR
-Match the name of the device.
-.TP 3n
 \fBDEVPATH\fR
-Match the devpath of the device.
+Match the devpath of the event device.
+.TP 3n
+\fBKERNEL\fR
+Match the name of the event device.
 .TP 3n
 \fBSUBSYSTEM\fR
-Match the subsystem of the device.
+Match the subsystem of the event device.
+.TP 3n
+\fBATTR{\fR\fB\fIfilename\fR\fR\fB}\fR
+Match sysfs attribute values of the event device. Up to five
+\fBATTR\fR
+keys can be specified per rule. Trailing whitespace in the attribute values is ignored, if the specified match value does not contain trailing whitespace itself. Depending on the type of operator, this key is also used to set the value of a sysfs attribute.
 .TP 3n
-\fBBUS\fR
+\fBKERNELS\fR
+Search the devpath upwards for a matching device name.
+.TP 3n
+\fBSUBSYSTEMS\fR
 Search the devpath upwards for a matching device subsystem name.
 .TP 3n
-\fBDRIVER\fR
+\fBDRIVERS\fR
 Search the devpath upwards for a matching device driver name.
 .TP 3n
-\fBID\fR
-Search the devpath upwards for a matching device name.
-.TP 3n
-\fBSYSFS{\fR\fB\fIfilename\fR\fR\fB}\fR
+\fBATTRS{\fR\fB\fIfilename\fR\fR\fB}\fR
 Search the devpath upwards for a device with matching sysfs attribute values. Up to five
-\fBSYSFS\fR
+\fBATTRS\fR
 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.
 .TP 3n
 \fBENV{\fR\fB\fIkey\fR\fR\fB}\fR
 Match against the value of an environment variable. Up to five
 \fBENV\fR
-keys can be specified per rule. This key can also be used to export a variable to the environment.
+keys can be specified per rule. Depending on the type of operator, this key is also used to export a variable to the environment.
 .TP 3n
 \fBPROGRAM\fR
 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 the RESULT key.
@@ -119,7 +124,7 @@ Matches zero, or any number of characters.
 Matches any single character.
 .TP 3n
 \fB[]\fR
-Matches any single character specified within the brackets. example, the pattern string 'tty[SR]' would match either 'ttyS' or 'ttyR'. Ranges are also supported within this match with the '\-' character. For example, to match on the range of all digits, the pattern [0\-9] would be used. If the first character following the '[' is a '!', any characters not enclosed are matched.
+Matches any single character specified within the brackets. For example, the pattern string 'tty[SR]' would match either 'ttyS' or 'ttyR'. Ranges are also supported within this match with the '\-' character. For example, to match on the range of all digits, the pattern [0\-9] would be used. If the first character following the '[' is a '!', any characters not enclosed are matched.
 .PP
 The following keys can get values assigned:
 .TP 3n
@@ -132,8 +137,11 @@ The name of a symlink targeting the node. Every matching rule can add this value
 \fBOWNER, GROUP, MODE\fR
 The permissions for the device node. Every specified value overwrites the compiled\-in default value.
 .TP 3n
+\fBATTR{\fR\fB\fIkey\fR\fR\fB}\fR
+The value that should be written to a sysfs attribute of the event device. Depending on the type of operator, this key is also used to match against the value of a sysfs attribute.
+.TP 3n
 \fBENV{\fR\fB\fIkey\fR\fR\fB}\fR
-Export a variable to the environment. This key can also be used to match against an environment variable.
+Export a variable to the environment. Depending on the type of operator, this key is also to match against an environment variable.
 .TP 3n
 \fBRUN\fR
 Add a program to the list of programs to be executed for a specific device. This can only be used for very short running tasks. Running an event process for a long period of time may block all further events for this or a dependent device. Long running tasks need to be immediately detached from the event process itself.
@@ -149,7 +157,7 @@ Import the printed result or the value of a file in environment key format into
 \fBprogram\fR
 will execute an external program and read its output.
 \fBfile\fR
-will inport a text file. If no option is given, udev will determine it from the executable bit of of the file permissions.
+will import a text file. If no option is given, udev will determine it from the executable bit of of the file permissions.
 .TP 3n
 \fBWAIT_FOR_SYSFS\fR
 Wait for the specified sysfs file of the device to be created. Can be used to fight against kernel sysfs timing issues.
@@ -187,13 +195,13 @@ The devpath of the device.
 .TP 3n
 \fB$id\fR, \fB%b\fR
 The name of the device matched while searching the devpath upwards for
-\fBBUS\fR,
-\fBID\fR
-\fBDRIVER\fR
+\fBSUBSYSTEMS\fR,
+\fBKERNELS\fR
+\fBDRIVERS\fR
 and
-\fBSYSFS\fR.
+\fBATTRS\fR.
 .TP 3n
-\fB$sysfs{\fR\fB\fIfile\fR\fR\fB}\fR, \fB%s{\fR\fB\fIfile\fR\fR\fB}\fR
+\fB$attr{\fR\fB\fIfile\fR\fR\fB}\fR, \fB%s{\fR\fB\fIfile\fR\fR\fB}\fR
 The value of a sysfs attribute found at the current or a parent device.
 .TP 3n
 \fB$env{\fR\fB\fIkey\fR\fR\fB}\fR, \fB%E{\fR\fB\fIkey\fR\fR\fB}\fR