| |
---|
| | |
---|
| | |
---|
| | :Author: Tim Daneliuk (tundra@tundraware.com) |
---|
| | |
---|
| | :Version: ``$Id: Deconstructing_Linux_udev_Rules.rst,v 1.122 2013/11/01 03:57:14 tundra Exp $`` |
---|
| | :Version: ``$Id: Deconstructing_Linux_udev_Rules.rst,v 1.123 2013/11/01 04:25:53 tundra Exp $`` |
---|
| | |
---|
| | |
---|
| | Précis |
---|
| | ====== |
---|
| |
---|
| | is also distro-specific, so you'll have to figure out what works on |
---|
| | your system. Rebooting is not distro-specific and can always be |
---|
| | accomplished by removing all power sources. This is not a recommended |
---|
| | best practice unless there is loud knocking at the door and |
---|
| | you *really* have to leave fast. |
---|
| | you have to leave *really* fast. |
---|
| | |
---|
| | |
---|
| | Our Example Rules |
---|
| | ================= |
---|
| | |
---|
| | We need two rules to achieve our goals above. Notice that the first |
---|
| | rule below is broken across multiple lines to make it more readable, |
---|
| | but it is all on one line in the actual rules file. It is possible to |
---|
| | break rules across lines but you have to ensure that you follow the |
---|
| | We need two rules to achieve our goals above. Notice that the rules |
---|
| | below are broken across multiple lines to make them more readable. In |
---|
| | the actual file, they entire rule is put on one line. It is possible |
---|
| | to break rules across lines, but you have to ensure that you follow the |
---|
| | syntax that ``udev`` expects. To keep things from mysteriously |
---|
| | breaking, it is best to put the entire rule one one line:: |
---|
| | breaking, it's easier just to keep the entire rule on one line:: |
---|
| | |
---|
| | ACTION=="add", KERNEL=="sd*", |
---|
| | PROGRAM=="/sbin/scsi_id --whitelisted /dev/$name", |
---|
| | RESULT=="VBOX_HARDDISK_VB5f712327-2bb4be0c", |
---|
| |
---|
| | |