|
Home > Archive > Linux Debian support > May 2007 > udev rules and key equality
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
udev rules and key equality
|
|
| PenguinsAnonymous@notAchance.org 2007-04-13, 1: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
| |
| Ben Peddell 2007-04-17, 7:13 am |
| 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.
| |
| PenguinsAnonymous@notAchance.org 2007-04-28, 1: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.
| |
| PenguinsAnonymous@notAchance.org 2007-05-04, 1: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
|
|
|
|
|