Re: [systemd-devel] [PATCH 3/5] udev: Update trackpoint rules to allow setting ibm trackpoint sensitivity
On Thu, 02.04.15 12:42, Hans de Goede (hdego...@redhat.com) wrote: > Hi, > > On 02-04-15 12:23, Lennart Poettering wrote: > >On Thu, 02.04.15 11:48, Hans de Goede (hdego...@redhat.com) wrote: > > > >>+# Same as below but also sets the TPPS/2 IBM TrackPoint driver sensitivity > >>+KERNELS=="input*", ATTR{device/name}=="TPPS/2 IBM TrackPoint", \ > >>+ IMPORT{builtin}="hwdb > >>'trackpoint:name:$attr{device/name}:$attr{[dmi/id]modalias}'", \ > >>+ RUN="/bin/sh -c 'echo -n $env{TRACKPOINT_SENSITIVTY} > > >>/sys$env{DEVPATH}/../../../sensitivity'", \ > >>+ GOTO="trackpoint_end" > > > >Invoking a shell for writing an attribute is certainly not OK. In > >particular since ATTR{} can be used to write attributes. > > Ok, are there any examples / docs for this ? See rules/ in the source tree. Grep for "ATTR{" and look for the uses with "=" (in contrast to "=="). THose are attribute assignments. (And the ones with == are attribute comparisons...) It's tersely documented in udev's man page. Lennart -- Lennart Poettering, Red Hat ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [PATCH 3/5] udev: Update trackpoint rules to allow setting ibm trackpoint sensitivity
Hi, On 02-04-15 12:23, Lennart Poettering wrote: On Thu, 02.04.15 11:48, Hans de Goede (hdego...@redhat.com) wrote: +# Same as below but also sets the TPPS/2 IBM TrackPoint driver sensitivity +KERNELS=="input*", ATTR{device/name}=="TPPS/2 IBM TrackPoint", \ + IMPORT{builtin}="hwdb 'trackpoint:name:$attr{device/name}:$attr{[dmi/id]modalias}'", \ + RUN="/bin/sh -c 'echo -n $env{TRACKPOINT_SENSITIVTY} > /sys$env{DEVPATH}/../../../sensitivity'", \ + GOTO="trackpoint_end" Invoking a shell for writing an attribute is certainly not OK. In particular since ATTR{} can be used to write attributes. Ok, are there any examples / docs for this ? Also, did you test this? THere's a pretty obvious typo in "TRACKPOINT_SENSITIVTY"... Yes I tested this, I've copy and pasted the typo to various places so it all matches up and thus works ... I'll fix both for v2 of this set. Regards, Hans ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [PATCH 3/5] udev: Update trackpoint rules to allow setting ibm trackpoint sensitivity
On Thu, 02.04.15 11:48, Hans de Goede (hdego...@redhat.com) wrote: > +# Same as below but also sets the TPPS/2 IBM TrackPoint driver sensitivity > +KERNELS=="input*", ATTR{device/name}=="TPPS/2 IBM TrackPoint", \ > + IMPORT{builtin}="hwdb > 'trackpoint:name:$attr{device/name}:$attr{[dmi/id]modalias}'", \ > + RUN="/bin/sh -c 'echo -n $env{TRACKPOINT_SENSITIVTY} > > /sys$env{DEVPATH}/../../../sensitivity'", \ > + GOTO="trackpoint_end" Invoking a shell for writing an attribute is certainly not OK. In particular since ATTR{} can be used to write attributes. Also, did you test this? THere's a pretty obvious typo in "TRACKPOINT_SENSITIVTY"... Lennart -- Lennart Poettering, Red Hat ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel