[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: hotplug, udev and usbkey question



Bob Alexander <bob@ngi.it> writes:

> I am wondering why the need to write such device specific rules as
> opposed to writing some catch-all ones.

You don't want the rule to be too specific unless you need to (like the
printer example in the previous post).  You do want it specific enough
to distinguish your device from other devices.  One of the problem, I
think, is there isn't a SYSFS key that specify type, ie. USB key.  Each
vendor basically has come up with their own information they provide.

For instance, for your IBM usb key, the product attribute is "USB 2.0
Memory Key", while mine (LEXAR) is "JumpDrive 2.0 Pro". How do we tell
that both are usb keys and not say an external harddrive?

> Now my USB key gets created fine but what if during a meeting someone
> hands me his ? Must write a new rule each time ????

I don't really have a good solution for this.  udev is programmable (as
in, instead of having specific rules, you can call a script which can
figure things out), but you are still have to know what the different
usb keys have in common.

-- 
John L. Fjellstad
web: http://www.fjellstad.org/          Quis custodiet ipsos custodes



Reply to: