2015-03-25, 03:00
(2015-03-24, 22:17)fritsch Wrote: Sadly lirc uses init.d to start and not upstart - see here: https://bugs.launchpad.net/mythbuntu/+bug/563139 for a lengthy workaround.
Edit: You need to remove the init.d way of starting lirc and using the upstart script instead.
Thanks for the link.
I tried to follow the suggestions but something went wrong. The two startup scripts I am using:
Code:
xbmc@xbmc:~$ cat /etc/init/lirc.conf
description "Lirc"
author "Rune"
start on local-filesystems
stop on starting shutdown
expect fork
#respawn
pre-start script
if [ ! -d "/var/run/lirc" ]; then
mkdir -p "/var/run/lirc"
fi
end script
script
exec /usr/sbin/lircd --output=/var/run/lirc/lircd --driver=commandir
rm -f /dev/lircd && ln -s /var/run/lirc/lircd /dev/lircd
emits lirc-started
end script
post-stop script
[ -h "/var/run/lirc/lircd" ] && rm -f /var/run/lirc/lircd
end script
My xbmc upstart script:
Code:
xbmc@xbmc:~$ cat /etc/init/xbmc.conf
# xbmc-upstart
# starts XBMC on startup by using xinit.
# by default runs as xbmc, to change edit below.
env USER=xbmc
emits xbmc-started
description "XBMC-barebones-upstart-script"
author "Matt Filetto"
start on (filesystem and stopped udevtrigger and started lirc)
stop on runlevel [016]
# tell upstart to respawn the process if abnormal exit
respawn
respawn limit 10 5
limit nice 21 21
script
exec su -c "xinit /usr/bin/xbmc --standalone :0" $USER
end script
If I remove lirc from /etc/init.d/ then Kodi never finds the /dev/lircd
Code:
01:53:32 T:139824437864192 INFO: LIRC Process: using: /dev/lircd
01:53:32 T:139824437864192 INFO: LIRC Connect: connect failed: No such file or directory
but if I leave lirc in /etc/init.d/ then Kodi boots up before LIRC is ready and I have to restart Kodi. So what is the correct way to "disable LIRC the init.d way"?
PS: If this is off-topic, let me know and I'll use another tread.