udev rules and key equality
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Debian support > Linux Debian support > udev rules and key equality




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    udev rules and key equality  
PenguinsAnonymous@notAchance.org


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-13-07 06:15 PM

Any udev prodigies?
I have the following 2 user rules defined.

BUS=="usb", KERNEL=="sdc[1-9]",
ATTRS{serial}=="0C01076160E298A4",
SYMLINK="u3_drive",
RUN+="/usr/bin/setsid /root/bu/partialbu.sh
u3_drive"

BUS=="usb", KERNEL=="sd??",
ATTRS{serial}=="0002F775867C431A",
SYMLINK="muvo_drive",
RUN+="/usr/bin/setsid /root/bu/bu.sh muvo_drive"

obviously they are on one line each.
But when I plug in the MuVO it is sometimes sdc1. The first rule
will match and run the backup even though the serial DOES NOT
match. It's driving me nuts!
The way I have them coded doesn't the serial number make them
very unique? It seems to be ignoring that key comparison.
I would expect kernel to match then serial to not match and
move on to the next rule?

Thanks for any help.
-Walt





[ Post a follow-up to this message ]



    Re: udev rules and key equality  
Ben Peddell


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-17-07 12:13 PM

PenguinsAnonymous@notAchance.org wrote:
> Any udev prodigies?
> I have the following 2 user rules defined.
>
> BUS=="usb", KERNEL=="sdc[1-9]",
> ATTRS{serial}=="0C01076160E298A4",
> SYMLINK="u3_drive",
> RUN+="/usr/bin/setsid /root/bu/partialbu.sh
> u3_drive"

Your UDEV probably doesn't understand ATTRS{} yet.
Either upgrade UDEV, or replace ATTRS{} with SYSFS{}.

>
> BUS=="usb", KERNEL=="sd??",
> ATTRS{serial}=="0002F775867C431A",
> SYMLINK="muvo_drive",
> RUN+="/usr/bin/setsid /root/bu/bu.sh muvo_drive"

Same here.





[ Post a follow-up to this message ]



    Re: udev rules and key equality  
PenguinsAnonymous@notAchance.org


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-28-07 06:12 PM

Ben Peddell <klightspeed@netspace.net.au> wrote:
> PenguinsAnonymous@notAchance.org wrote: 
>
> Your UDEV probably doesn't understand ATTRS{} yet.
> Either upgrade UDEV, or replace ATTRS{} with SYSFS{}.
> 
>
> Same here.

Do you know relatively how old sysfs usage is? Since the
beginning of udev?

Thanks.





[ Post a follow-up to this message ]



    Re: udev rules and key equality  
PenguinsAnonymous@notAchance.org


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-04-07 06:14 AM


> Do you know relatively how old sysfs usage is? Since the
> beginning of udev?
>

Sorry I meant attrs. My kernel isn't all that old at 2.6.18
and udev-104-r11.
At any rate it appears your analysis is correct.
Changing attrs to sysfs fixed the problem.
Thanks.
-Walt





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 05:58 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register