1 |
On Fri, Nov 30, 2012 at 10:00 AM, Neil Bothwick <neil@××××××××××.uk> wrote: |
2 |
> On Thu, 29 Nov 2012 19:07:11 +0000, Jorge Almeida wrote: |
3 |
> |
4 |
>> This is indeed the device I meant, and the serial number is the |
5 |
>> "E68911000519" substring. But this symlink exists because udev created |
6 |
>> it. I need to somehow dig it out of /sys, not out of /dev. IOW, how did |
7 |
>> udev retrieved the information to create the symlink? |
8 |
> |
9 |
> This is all done in /usr/lib/udev/rules.d/60-persistent-storage.rules |
10 |
> |
11 |
> ENV{SERIAL} seems to be the key, but udev rules use variables rather than |
12 |
> accessing /sys directly. |
13 |
|
14 |
The point is what sets the variables. I don't think the kernel sets SERIAL, at |
15 |
least it doesn't export it via the hotplug mechanism. Maybe it does it via |
16 |
netlink, but where oh where is the documentation for that? Short of reading |
17 |
the source, which is beyond my skills... |
18 |
|
19 |
> |
20 |
> I really like udev as it makes just about anything you want to do easy, |
21 |
> it's a shame to watch it getting lost. |
22 |
> |
23 |
udev is a good idea, but it was plagued from the very beginning with the |
24 |
syndrome "we know this arcane stuff, you don't need to understand as long as |
25 |
your distro's devs can make it JustWork". Most users don't care, but some do, |
26 |
as this is linux. |
27 |
|
28 |
Cheers |
29 |
|
30 |
Jorge Almeida |