On Fri, Nov 30, 2012 at 10:00 AM, Neil Bothwick <n...@digimed.co.uk> wrote:
> On Thu, 29 Nov 2012 19:07:11 +0000, Jorge Almeida wrote:
>
>> This is indeed the device I meant, and the serial number is the
>> "E68911000519" substring. But this symlink exists because udev created
>> it. I need to somehow dig it out of /sys, not out of /dev. IOW, how did
>> udev retrieved the information to create the symlink?
>
> This is all done in /usr/lib/udev/rules.d/60-persistent-storage.rules
>
> ENV{SERIAL} seems to be the key, but udev rules use variables rather than
> accessing /sys directly.

The point is what sets the variables. I don't think the kernel sets SERIAL, at
least it doesn't export it via the hotplug mechanism. Maybe it does it via
netlink, but where oh where is the documentation for that? Short of reading
the source, which is beyond my skills...

>
> I really like udev as it makes just about anything you want to do easy,
> it's a shame to watch it getting lost.
>
udev is a good idea, but it was plagued from the very beginning with the
syndrome "we know this arcane stuff, you don't need to understand as long as
your distro's devs can make it JustWork". Most users don't care, but some do,
as this is linux.

Cheers

Jorge Almeida

Reply via email to