X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=docs%2Fwriting_udev_rules%2Findex.html;h=5fedb3f8c0f2f093c17fed46ffe05406bc17510d;hb=4ad3a37f50ed3af4158cd0d0badbd146eb8e3500;hp=92891376f5da0c22e0909f25c2f23a1f481dd9e1;hpb=fbb002f9d31c76f9445c4c16b3b88b11e34f8e86;p=elogind.git diff --git a/docs/writing_udev_rules/index.html b/docs/writing_udev_rules/index.html index 92891376f..5fedb3f8c 100644 --- a/docs/writing_udev_rules/index.html +++ b/docs/writing_udev_rules/index.html @@ -17,7 +17,7 @@
+SUBSYSTEM=="block", SUBSYSTEMS=="scsi", ATTRS{model}=="ST3120827AS", NAME="my_hard_disk"SUBSYSTEM=="block", ATTR{size}=="234441648", NAME="my_hard_disk" -SUBSYSTEM="block", SUBSYSTEMS=="scsi", ATTRS{model}=="ST3120827AS", NAME="my_hard_disk"
You may have noted the use of colour in the above examples. This is to demonstrate that while it is legal to combine the attributes from the device in question and a single parent device, you cannot mix-and-match attributes from multiple parent devices - your rule will not work. For example, the following rule is invalid as it attempts to match attributes from two parent devices: @@ -735,7 +736,7 @@ A USB hard disk is comparable to the USB camera I described above, however typic Of course, if you have a 100GB USB hard disk, it is perfectly understandable that you might want to partition it, in which case we can take advantage of udev's string substitutions:
-+KERNEL=="sd*", SUBSYSTEMS="scsi", ATTRS{model}=="USB 2.0 Storage Device", SYMLINK+="usbhd%n"
KERNEL=="sd*", SUBSYSTEMS=="scsi", ATTRS{model}=="USB 2.0 Storage Device", SYMLINK+="usbhd%n"
This rule creates symlinks such as: