[systemd-devel] udev/command/module/service

Вечный Студент student975 at yandex.ru
Sun Sep 2 07:23:38 PDT 2012


On 02.09.2012 18:04, Zbigniew Jędrzejewski-Szmek wrote:> Why don't you add
>   ExecStartPre=/usr/bin/setserial /dev/ttyS0 uart none
>   ExecStartPre=/sbin/modprobe lirc_serial
> in lircd.service?

On 02.09.2012 18:04, Colin Guthrie wrote:> Can you use a templated unit for lircd? e.g. lircd at ttyS0.service,
> afterall I presume you have to run a separate licrd for each serial port
> you have.
> 
> If so, then your licrd at .service file would contain something like:
> 
> 
> ExecStartPre=-/usr/bin/rmmod lirc_serial
> ExecStartPre=-/usr/bin/setserial /dev/%i uart none
> ExecStartPre=-/sbin/modprobe lirc_serial
> ExecStart=....
> 
> Not sure it's the most graceful of solutions and if you do have multiple
> remotes connected (admittedly a somewhat uncommon setup) then the rmmod
> will likely fail).
> 
> Still you might be able to do what you need to do with ExecStartPre even
> in a non-templated unit that will do what you need it to.

Zbigniew, Colin,

Thanks! - ExecStartPre did the job. 
Colin, yes, I use non-templated way.


a


More information about the systemd-devel mailing list