On Wed, 2008-01-23 at 08:19 +0800, Joe Morris (NTM) wrote:
On 01/22/2008 07:32 PM, Juergen Weigert wrote:
I have attempted /etc/udev/rules.d/99-cdrom.conf
containing:
KERNEL=="dvd1" SYMLINK="cdrom", MODE="666" OPTIONS="last_rule"
udev happily ignores this rule. I'd expect to get a /dev/cdrom symlink. But nothing is created, even after reboot. Any hints how to debug?
It is controlled by 60-cdrom_id.rules, which calls a program called cdrom_id, and 70-persistent-cd.rules contains the rules created by the write_cd_rules script. For example, mine is: # This file was automatically generated by the /lib/udev/write_cd_rules # program, probably run by the cd-aliases-generator.rules rules file. # # You can modify it, as long as you keep each rule on a single line # and set the $GENERATED variable.
# DVD_RW_ND-3520AW (pci-0000:00:0f.1-scsi-1:0:0:0) ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:0f.1-scsi-1:0:0:0", SYMLINK+="cdrom", ENV{GENERATED}="1" ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:0f.1-scsi-1:0:0:0", SYMLINK+="cdrw", ENV{GENERATED}="1" ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:0f.1-scsi-1:0:0:0", SYMLINK+="dvd", ENV{GENERATED}="1" ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:0f.1-scsi-1:0:0:0", SYMLINK+="dvdrw", ENV{GENERATED}="1"
The rules files are read alphabetically. Or, numerically, in fact. The number at the beginning controls the order the rules are added. If there is no last_rule directive, udev appends each appropriate rule in the order the rules files are read. So one need not modify this file as it contains no last_rule directives. Just add a rule that will be read in later that does what is wanted. In this case, the name of the rule file should be > 60. The trick here is finding what rules are consulted for each device. The udevmonitor program is nice for pluggable devices. I have never been able to find an easy human usable method to get the same info for static devices, like a built-in cd drive. -- Roger Oberholtzer OPQ Systems / Ramböll RST Ramböll Sverige AB Kapellgränd 7 P.O. Box 4205 SE-102 65 Stockholm, Sweden Office: Int +46 8-615 60 20 Mobile: Int +46 70-815 1696 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org