Code review comment for lp:~manjo/ubuntu/trusty/systemd/HP-m800

Revision history for this message
Martin Pitt (pitti) wrote :

For efficiency reasons I'd like to avoid calling the two shells and the cat on every platform. This can be done more efficiently with

SUBSYSTEM=="input", KERNEL=="event*", SUBSYSTEMS=="platform", KERNELS=="gpio_keys.12", ATTRS{keys}=="116", PROGRAM="/bin/cat /proc/device-tree/model", RESULT=="HP ProLiant m800*", TAG+="power-switch"

Then on any system which doesn't have a gpio_keys.12 there will be no additional program calls at all, and on that device it's a single cat (and if the file isn't pesent it'll just fail and RESULT will be empty).

Can you please double-check that?

review: Needs Fixing

« Back to merge proposal