X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=udev%2Fudev.xml;h=ccc1f45e4cf92b16bd9f2a9783696667f933a774;hp=c740c0d80705c22b9167f80f1fb93a9b9e148264;hb=aeb53ca3d60057dfbb948b222046dcecfcc11ed9;hpb=726687ad48bdececed1e7e44387c50e009e28208 diff --git a/udev/udev.xml b/udev/udev.xml index c740c0d80..ccc1f45e4 100644 --- a/udev/udev.xml +++ b/udev/udev.xml @@ -74,8 +74,15 @@ the custom rules directory /etc/udev/rules.d/ and the temporary rules directory /dev/.udev/rules.d/. All rule files are sorted and processed in lexical order, regardless - in which of these directories they live. Every line in the rules file contains at least - one key value pair. There are two kind of keys, match and assignment keys. + in which of these directories they live. + + Rule files are required to have a unique name, duplicate file names + are ignored. Files in /etc/udev/rules.d/ have precedence + over files with the same name in /lib/udev/rules.d/. This + can be used to ignore a default rules file if needed. + + 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. @@ -177,11 +184,9 @@ - Match sysfs attribute values of the event device. Up to five - keys can be specified per rule. Trailing + Match sysfs attribute values of the event device. 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. + value does not contain trailing whitespace itself. @@ -211,7 +216,7 @@ Search the devpath upwards for a device with matching sysfs attribute values. - Up to five keys can be specified per rule, but all of them + If multiple matches are specified, 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. @@ -220,9 +225,7 @@ - Match against the value of an environment variable. Up to five - keys can be specified per rule. Depending on the type of operator, this key is also used - to export a variable to the environment. + Match against a device property value. @@ -237,10 +240,10 @@ - Execute external program. The key is true, if the program returns - 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. + Execute a program. The key is true, if the program returns + successfully. The device properties are made available to the + executed program in the environment. The program's output printed to + stdout, is available in the RESULT key. @@ -314,16 +317,14 @@ 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. + event device. - Export a variable to the environment. Depending on the type of operator, - this key is also to match against an environment variable. + Set a device property value. @@ -361,7 +362,7 @@ - Import a set of variables into the event environment, + Import a set of variables as device properties, depending on type: @@ -466,7 +467,7 @@ , , 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 + 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 being processed. The available substitutions are: @@ -525,7 +526,7 @@ , - The value of an environment variable. + A device property value.