[ltp] Re: T61, Lenovo quality, Linux pre-installed, alternatives
Elias Oltmanns
linux-thinkpad@linux-thinkpad.org
Tue, 13 May 2008 11:25:05 +0200
Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>> In any case I implemented the following udev rule that sets the
>
>> 'power' attribute to 'auto' when the device is detected by udev:
>
>> # Set the power mode of the fingerprint reader to auto, ensuring that it doesn't draw
>> # power that we otherwise don't care about.
>> SUBSYSTEMS=="usb", ATTR{manufacturer}=="STMicroelectronics", ATTR{product}=="Biometric Coprocessor", ATTR{power/level}="auto"
>
> Cool! I didn't know you could set attributes directly from udev rules.
> I tried it by running some external script, which had all kinds of
> problems. I'll try this one.
Yes, this rule seems to be pretty much what I had in mind. Actually,
even though I was well aware that udev can set sysfs attributes
according to rules, I hitherto implicitly assumed the argument to ATTR
was restricted to simple file names (i.e., without slashes). That's why
I said, the udev approach might turn out to be tricky, thinking that a
helper script might be necessary.
Well, udev certainly has shown a lot of progress regarding flexibility
so far.
Regards,
Elias