LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-09-2006, 06:34 AM   #1
rignes
Member
 
Registered: Mar 2003
Location: USA
Distribution: Slackware-current
Posts: 155

Rep: Reputation: 30
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
 
Old 08-09-2006, 07:00 AM   #2
Yalla-One
Member
 
Registered: Oct 2004
Location: Norway
Distribution: Slackware, CentOS
Posts: 641

Rep: Reputation: 36
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
 
Old 08-09-2006, 07:05 AM   #3
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,448
Blog Entries: 7

Rep: Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553
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!

Last edited by rkelsen; 08-09-2006 at 07:07 AM.
 
Old 08-09-2006, 08:00 AM   #4
crisostomo_enrico
Member
 
Registered: Dec 2005
Location: Madrid
Distribution: Solaris 10, Solaris Express Community Edition
Posts: 547

Rep: Reputation: 36
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

Last edited by crisostomo_enrico; 08-09-2006 at 08:02 AM.
 
Old 08-09-2006, 08:54 AM   #5
rignes
Member
 
Registered: Mar 2003
Location: USA
Distribution: Slackware-current
Posts: 155

Original Poster
Rep: Reputation: 30
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.
 
Old 08-09-2006, 03:25 PM   #6
rignes
Member
 
Registered: Mar 2003
Location: USA
Distribution: Slackware-current
Posts: 155

Original Poster
Rep: Reputation: 30
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
 
Old 08-10-2006, 03:43 AM   #7
crisostomo_enrico
Member
 
Registered: Dec 2005
Location: Madrid
Distribution: Solaris 10, Solaris Express Community Edition
Posts: 547

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


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating rules for udev wnaLinux Slackware 5 01-03-2008 09:21 AM
UDEV Rules Location Toods Slackware 1 04-28-2006 02:23 AM
Udev rules working but... cferron Linux - Hardware 5 03-24-2006 02:46 AM
need help fixing my udev rules or ivman rules hedpe Linux - Hardware 2 03-18-2006 10:07 AM
Networking rules (udev) cassi0peias Linux - Networking 1 10-18-2005 10:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration