LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-30-2010, 12:43 PM   #1
Pigi_102
Member
 
Registered: Aug 2008
Posts: 186

Rep: Reputation: 22
UDEV problem ( or misunderstanding )


Hi all,
after upgrading to slackware 13.1 I'm trying to convert my old udev rules to new version, as I get a lot of warning about SYSFS or BUS that would disappear in a very near future.

I'm fighting at the moment with the rule for my ipod.
This one is perfectly working:
Code:
BUS=="scsi", SYSFS{vendor}=="Apple", KERNEL=="sd?1", NAME="%k" , SYMLINK+="ipod", RUN+="/etc/udev/scripts/mount-ipod.sh"
And this one ( with attributes corrected ) don't:
Code:
SUBSYSTEMS=="scsi", ATTRS{manufacturer}=="Apple Inc." , ATTRS{product}=="iPod" , KERNEL=="sd?1", SYMLINK+="ipod"
My intent is to get a /dev/ipod link to whatever /dev/sd*1 get created by usb subsystem.

What am I doing wrong ?
Is there some command to check how the rules get interpreted sequentially ?

Thanks in advance
Pigi
 
Old 12-30-2010, 03:33 PM   #2
Pigi_102
Member
 
Registered: Aug 2008
Posts: 186

Original Poster
Rep: Reputation: 22
Problem found.

Somewhere I had read that the "vendor" attribute would not have been set with new interface but that is not true.
I changed
Code:
ATTRS{manufacturer}=="Apple Inc." , ATTRS{product}=="iPod" ,
with

Code:
ATTRS{vendor}=="Apple"
and it start to work again.

Pigi
 
Old 12-30-2010, 09:07 PM   #3
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
If you know the name of the /dev/* file (there are other ways but this is the easiest) you can get the device attributes that can be used in a udev rule. For example:
Code:
udevadm info --attributes --path "$( udevadm info --query=path --name=/dev/sdc1 )"
To test rules, use udevadm test <devpath> for example:
Code:
udevadm test "$( udevadm info --query=path --name=/dev/sdc1 )"
To make udevd re-load rules:
Code:
udevadm control --reload-rules
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Installation Misunderstanding? linuxgoose Linux - Software 6 03-15-2010 09:18 PM
Am I misunderstanding IF...THEN in bash script? ic0n Linux - General 5 10-18-2009 05:19 PM
IPTABLES Misunderstanding davidz Linux - Security 5 08-30-2007 09:39 AM
Misunderstanding Logical Drives chess380 Linux - Newbie 11 01-10-2007 04:06 AM
select - a misunderstanding jhon Programming 3 09-08-2004 12:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:25 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