[systemd-devel] systemd unit review requested
Tom Gundersen
teg at jklm.no
Thu Dec 5 09:19:45 PST 2013
On 5 Dec 2013 07:48, "Peter Hutterer" <peter.hutterer at who-t.net> wrote:
>
> When I fired up F20 on one of my laptops here I noticed that inputattach
> doesn't work anymore for serial Wacom devices. It used to be started
through
> udev, but that doesn't work anymore. So moving to a systemd service it is,
> but I'd like a review of the changes please.
>
> The goal is to start inputattach for a serial Wacom device if the pnpid
> matches a certain set. The old udev rule was:
>
> SUBSYSTEM=="tty|pnp", KERNEL=="ttyS[0-9]*", ATTRS{id}=="WACf*", \
> RUN+="/usr/sbin/modprobe wacom_w8001", \
> RUN+="/usr/sbin/inputattach --daemon -w8001 /dev/%k"
>
> the new rule now is:
>
> SUBSYSTEM=="tty|pnp", KERNEL=="ttyS[0-9]*", ATTRS{id}=="WACf*", \
> ENV{SYSTEMD_WANTS}="wacom-inputattach@%k.service",TAG+="systemd"
>
>
> And the matching wacom-inputattach at .service file shows:
>
> [Unit]
> Description="Start inputattach for Wacom ISDv4-compatible serial devices"
>
> [Service]
> Type=simple
> ExecStartPre=/usr/sbin/modprobe wacom_w8001
Seems like this should be auto loaded? If not, you might want to load it
directly from the udev rule using the kmod built-in.
Cheers,
Tom
> ExecStart=/usr/bin/inputattach -w8001 /dev/%I
>
> Anything I'm missing, anything I should change?
>
> Also, do I need this in any target, or is dropping this into
> /usr/lib/systemd/system/ enough?
>
> Thanks in advance.
>
> Cheers,
> Peter
> ~
>
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20131205/efdca4c5/attachment.html>
More information about the systemd-devel
mailing list