You are not logged in.
Anyone aware of a functional lircd.service for systemd and lircd?
Last edited by graysky (2012-05-11 01:45:15)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
I could make one for you if you want, but first I'd need to read up on lircd. And no, sadly I didn't find anything regarding that
Offline
The following works for me:
[Unit]
Description=LIRC Daemon
After=network.target
[Service]
Type=forking
PIDFile=/var/run/lirc/lircd.pid
ExecStartPre=/bin/mkdir -p /var/run/lirc
ExecStartPre=/bin/rm -f /dev/lircd
ExecStartPre=/bin/rm -f /var/run/lirc/lircd
ExecStartPre=/bin/ln -s /var/run/lirc/lircd /dev/lircd
ExecStartPre=/usr/bin/ir-keytable -p lirc
ExecStart=/usr/sbin/lircd -d /dev/lirc0 -P /var/run/lirc/lircd.pid
ExecStopPost=/bin/rm -f /dev/lircd
ExecStopPost=/bin/rm -fR /var/run/lirc
[Install]
WantedBy=multi-user.target
You probably don't want the ir-keytable bit, and the hard coded /dev/lirc0 is quite bodgy.
I took the one here: http://lists.freedesktop.org/archives/s … 01182.html and modified it a bit.
Offline
thanks electric, I'll try it out
EDIT: works!
https://wiki.archlinux.org/index.php/Sy … ices#lircd
Last edited by graysky (2012-05-11 01:45:05)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Offline
Can someone tell me why this tmpfile using systemd does not work ?
# LIRC Workaround (2.6.38 Upgrade)
# echo lirc > /sys/class/rc/rc0/protocols
# echo lirc > /sys/class/rc/rc1/protocols
# echo lirc > /sys/class/rc/rc2/protocols
w /sys/class/rc/rc0/protocols - - - - lirc
w /sys/class/rc/rc1/protocols - - - - lirc
w /sys/class/rc/rc2/protocols - - - - lirc
cat /sys/class/rc/rc0/protocols
rc-5 nec [rc-6] jvc sony sanyo mce_kbd lirc
Offline
/etc/systemd/system/lirc.service
see ExecStartPost's
[Unit]
Description=Linux Infrared Remote Control
[Service]
EnvironmentFile=/etc/conf.d/lircd.conf
ExecStartPre=/usr/bin/ln -sf /dev/lirc0 /dev/lirc
ExecStartPre=/usr/bin/ln -sf /run/lirc/lircd /dev/lircd
ExecStart=/usr/sbin/lircd --pidfile=/run/lirc/lircd.pid
ExecStartPost=/bin/sh -c "echo 'lirc' > /sys/class/rc/rc0/protocols"
ExecStartPost=/bin/sh -c "echo 'lirc' > /sys/class/rc/rc1/protocols"
ExecStartPost=/bin/sh -c "echo 'lirc' > /sys/class/rc/rc2/protocols"
Type=forking
PIDFile=/run/lirc/lircd.pid
[Install]
WantedBy=multi-user.target
Offline
Hey guys..how did you manage to solve problem concerning the release of serial port?!
i had this two lines in rc.local:
setserial /dev/ttyS0 uart none
modprobe lirc_serial
Offline