https://www.thinkwiki.org/w/index.php?title=Udev_rules_-_wyrfel&feed=atom&action=historyUdev rules - wyrfel - Revision history2024-03-28T21:50:33ZRevision history for this page on the wikiMediaWiki 1.31.12https://www.thinkwiki.org/w/index.php?title=Udev_rules_-_wyrfel&diff=15574&oldid=prevWyrfel at 21:43, 24 September 20042004-09-24T21:43:38Z<p></p>
<p><b>New page</b></p><div>This creates the usual /dev/floppy, /dev/cdrom, /dev/mouse etc. symlinks.<br />
Additionally it also creates a dir /dev/names.d which includes symlinks which consist<br />
of more expressive names, which you can then use in scripts to provide nice names.<br />
For instance /dev/names.d/DVD-CDRW will point to /dev/names.d/sr0, when the Toshiba SD-R9012<br />
drive is inserted into the Ultrabay. So you can make a script realise that the human readable<br />
descriptor of /dev/names.d/sr0 is DVD-CDRW.<br />
<br />
Save this as i.e. <tt>/etc/udev/rules.d/00-t41p.rules</tt> to make it take affect.<br />
----<br />
<br />
# /etc/udev/rules.d/00-t41p.rules: Rule definitions for the 2373-GHG T41p.<br />
#<br />
# creates useful symlinks and a names.d folder with symlinks that can<br />
# be used by scripts to trigger expressive names for some devices<br />
<br />
# create a /dev/mouse symlink for /dev/psaux<br />
KERNEL="psaux", SYMLINK="mouse names.d/Mouse"<br />
<br />
# get the /dev/floppy symlink<br />
KERNEL="fd0", SYMLINK="floppy names.d/Floppy"<br />
<br />
# create the /dev/dvd, /dev/cdrom and /dev/cdrw symlinks<br />
BUS="scsi", KERNEL="sr[0-9]", SYSFS{vendor}="TOSHIBA", SYSFS{model}="DVD-ROM SD-R9012", NAME="%k", SYMLINK="cdrom dvd cdrw names.d/DVD-CDRW"<br />
<br />
# add a /dev/flash symlink for PCMCIA mounted CompactFlash cards<br />
BUS="ide", SYSFS{dev}="33:*", NAME="%k", SYMLINK="flash%n names.d/CompactFlash"</div>Wyrfel