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

Вечный Студент student975 at yandex.ru
Sun Sep 2 06:47:32 PDT 2012

The aim is to use LIRC with lirc_serial module. To get it these operations must take place in a given order:

- udev must name a serial port
- serial port must be freed from (built in) kernel serial driver with command 'setserial /dev/ttyS0 uart none'
- lirc_serial driver must be loaded
- lircd service must be started

I have tried to add 'setserial ...' command into udev rule (RUN+=), add lirc_serial module to /etc/modules-load and enable lircd service - all these under systemd - but needed sequence of operation takes place randomly only. Currently I use custom script which I start manually after booting (and, of course, it does work always):

~ $ cat `which mylirc.sh`

/usr/bin/systemctl stop lircd.service
/usr/bin/rmmod lirc_serial
/usr/bin/setserial /dev/ttyS0 uart none
/sbin/modprobe lirc_serial
/usr/bin/systemctl start lircd.service

Can anybody suggest legal systemd/udev way to get needed sequence of operations?

More information about the systemd-devel mailing list