Skip to contentSkip to conversation

udev.rules woes

DISCUSSION Guido Schimmels 2 participants 2 messages Jan 23, 2004 – Jan 26, 2004

lore
Share & tools
lore
#0 lore raw

To reproduce my static /dev with udev, I tried and replaced:

BUS="ide", PROGRAM="/bin/cat /proc/ide/%k/media", RESULT="cdrom", NAME="%k", SYMLINK="cdrom"

with:

BUS="ide", PROGRAM="/bin/cat /proc/ide/hdc/media", RESULT="cdrom", NAME="hdc", SYMLINK="cdrom"

BUS="ide", PROGRAM="/bin/cat /proc/ide/hda/media", RESULT="cdrom", NAME="hda", SYMLINK="cdrom"

BUS="ide", PROGRAM="/bin/cat /proc/ide/hdd/media", RESULT="cdrom", NAME="hdd", SYMLINK="cdrom1"

BUS="ide", PROGRAM="/bin/cat /proc/ide/hdb/media", RESULT="cdrom", NAME="hdb", SYMLINK="cdrom1"

Looks innocent enough, but triggers completely unexpected behaviour. It makes __all__ IDE device nodes disappear, except /dev/hdc and /dev/ cdrom symlinked to it.

I installed udev only yesterday.
(udev-014 (klibc build) / kernel-2.6.1 + sysfs patches)

At least this worked:

SYSFS_name="BT848*", NAME="bttv", SYMLINK="video0" SYSFS_name="BT878*", NAME="bttv", SYMLINK="video0" SYSFS_name="*webcam*", NAME="webcam", SYMLINK="video1"

So I don't feel completely dumb now.

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#1 lore raw
Quoted 6 lines · Guido Schimmels

To reproduce my static /dev with udev, I tried and replaced:

BUS="ide", PROGRAM="/bin/cat /proc/ide/%k/media", RESULT="cdrom", NAME="%k", SYMLINK="cdrom"

Quoted 8 lines

with:

BUS="ide", PROGRAM="/bin/cat /proc/ide/hdc/media", RESULT="cdrom", NAME="hdc", SYMLINK="cdrom"

Looks innocent enough, but triggers completely unexpected behaviour. It makes __all__ IDE device nodes disappear, except /dev/hdc and /dev/ cdrom symlinked to it.

No, it doesn't look innocent, in any kind :) You ask for _every_ ide device "if hdc is a cdrom" and if yes please give it the name 'hdc'. The first rule matches every time.

Why not stick with the provided example? It just works. If you want your own rules, you may add KERNEL= to the rule.

thanks,
Kay

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel