You are not logged in.
Before I switched to systemd, the /etc/rc.d/lirc.d daemon script would read the file /etc/conf.d/lircd.conf in order to get custom options. In particular, I used this to configure the device LIRC should listen to, and set the driver to devinput. Now that I use systemd, how can I set this options? I tried creating a custom lirc.service in /etc/systemd/system/ (see below), but it does not work. When I reenable/restart the service it gives me the following error:
Failed to issue method call: Unit lirc.service failed to load: Invalid argument. See system logs and 'systemctl status lirc.service' for details.
How can I fix this?
Thanks!
/etc/conf.d/lircd.conf:
#
# Parameters for lirc daemon
#
#LIRC_DEVICE="/dev/lirc0"
LIRC_DEVICE="/dev/input/event8"
#LIRC_DRIVER=""
LIRC_DRIVER="devinput"
LIRC_EXTRAOPTS=""
LIRC_CONFIGFILE=""
/etc/systemd/system/lirc.service:
.include /usr/lib/systemd/system/lirc.service
[Service]
EnvironmentFile=/etc/conf.d/lircd.conf
ExecStart=/usr/sbin/lircd --pidfile=/run/lirc/lircd.pid --device=${LIRC_DEVICE} --driver=${LIRC_DRIVER} ${LIRC_CONFIGFILE}
Offline
You service file is missing many key parts. You should probably check out the systemd.service man page as well as the systemd.unit man page.
Offline
You service file is missing many key parts.
I did not create "my" service. I just overwrote some options by creating a file in "/etc/systemd/system/", as explained on the wiki. The original service is loaded using the command .include at the beginning of the file, as you can see...
Last edited by palmaway (2012-10-09 23:15:17)
Offline
Rather than use the include line, why not just copy the entire contents of /usr/lib/systemd/system/lirc.service?
Offline
Thanks for your reply, anonymous_user.
I actually worked a little bit more on it and I was able to get it working, even though the 'lirc.service' should be fixed. I reported this bug:
https://bugs.archlinux.org/task/31890
The changes I made to the 'lirc.service' file are there too, in case anyone is interested. Anyway, now I have a complete new service file in /etc/systemd/system/lirc.service file, instead of one with the ".include" option. I wonder why that did not work...
Offline
I can confirm this problem. I am using (also) a custom service file for lirc, which was listed on the wiki.
You can still find it on the wiki using an old snapshot: https://wiki.archlinux.org/index.php?ti … did=225468.
Last edited by dejavu (2012-10-15 17:01:38)
Offline
Hi,
this hurt me many times too..
This seems to be the explanation. So no overriding of default entries although the opposite is claimed.
Offline
Hi,
this hurt me many times too..
This seems to be the explanation. So no overriding of default entries although the opposite is claimed.
I don't think that this has something to do with the lirc-utils problem.
Simply said, the lirc service file doesn't read the config file and therefore it can't work. I would like to know, why the maintainer of the lirc-utils package made such a minimalistic service file.
Offline