LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   slackware-current, udev 0.96, and custom udev rules not working (http://www.linuxquestions.org/questions/slackware-14/slackware-current-udev-0-96-and-custom-udev-rules-not-working-472262/)

rignes 08-09-2006 06:34 AM

slackware-current, udev 0.96, and custom udev rules not working
 
I just updated to the most recent -current. I have everything working fine except for one thing, my custom udev rules don't seem to be working. I have a file called 10-local.rules in my /etc/udev/rules.d directory with the contents of:

BUS="usb", SYSFS{manufacturer}="Cypress Semiconductor", SYSFS{product}="USB2.0 Storage Device", KERNEL="sd*", NAME="%k", SYMLINK="backup%n"
BUS="scsi", SYSFS{model}="USB Flash Memory", KERNEL="sd*", NAME="%k", SYMLINK="pendrive"
BUS="usb", SYSFS{product}="iAUDIO M5", KERNEL="sd*", NAME="%k", SYMLINK="iaudio"

Which has been working correctly. According to the udev man page all files in ruldes.d with the extention of .rules will be read in lexical order. My devices work fine, it's just that udev doesn't create the symlinks that I expect them to according to the above rules.

Has anyone else run into this?

Thanks,

Brian

Yalla-One 08-09-2006 07:00 AM

Have you tried dropping the KERNEL and NAME parameters (if all you want to do is symlink, you shouldn't override the NAME parameter, as I believe that can cause trouble with the native udev rules.

A good practice seems to be to only use the SYSFS{} variables and then symlink/alias only, as this doesn't interfere with the base udev settings.

Thus the following might be worth a shot:

Code:

BUS="usb", SYSFS{manufacturer}="Cypress Semiconductor", SYSFS{product}="USB2.0 Storage Device", SYMLINK="backup%n"
-Y1

rkelsen 08-09-2006 07:05 AM

Which kernel version are you running?

Note that udev-096 requires at least a 2.6.15 kernel to work properly.

Pat has noted this in today's Changelog, which, coincidentally, contains the 3rd update to udev in as many days!

crisostomo_enrico 08-09-2006 08:00 AM

Syntax of rule files has changed!

Filters must have == instead of =, assignements has the = and SYMLINK now wants +=.

Your file should look like:
BUS=="usb", SYSFS{manufacturer}=="Cypress Semiconductor", SYSFS{product}=="USB2.0 Storage Device", KERNEL=="sd*", NAME="%k", SYMLINK+="backup%n"

Bye

rignes 08-09-2006 08:54 AM

Quote:

Originally Posted by rkelsen
Which kernel version are you running?

Note that udev-096 requires at least a 2.6.15 kernel to work properly.

Pat has noted this in today's Changelog, which, coincidentally, contains the 3rd update to udev in as many days!

Yeah, I saw that this morning after my post! Interesting. I am running 2.6.16.18 so I should be good.

crisostomo_enrico:

That's interesting to know! I didn't even consider a syntax change as a possability. I'll try it out when I get home from work.

Thanks.

rignes 08-09-2006 03:25 PM

So, I gave it a shot and I ultimately had to edit the rules file as crisostomo_enrico. But I also had to reduce each rule to include just SYSFS and SYMLINK directives before my rules finally took effect.

Thanks for all the input guys. I seem to be good for now. Until the next big udev update comes along. ;)

Regards,

Brian

crisostomo_enrico 08-10-2006 03:43 AM

So didn't I. :) And when my custom udev rules stopped working, I had to dig it out!


All times are GMT -5. The time now is 12:34 PM.