[mythtv-users] lircd setup with hdhomerun kludge

Stephen Worthington stephen_agent at jsw.gen.nz
Wed Aug 22 03:48:33 UTC 2018


On Tue, 21 Aug 2018 11:05:43 -0700, you wrote:

>Sometimes going for a long walk is a good thing.  I did and then issued
>this command:
>
>sudo /lib/systemd/systemd-sysv-install enable lirc
>
>Now my remote is back and I am happy to leave the kludge in.
>
>Allen

It looks like lirc in 16.04 is still using the old SysV init system -
it has its control file in /etc/init.d/lirc, rather than
/lib/systemd/system/lirc.service.  Since 16.04 uses systemd, things
like lirc that still use init.d are supported by systemd through a
kludge that does some of what the init.d used to do.  So when you run
"systemctl start lirc", systemd will, through the kludge, eventually
run "/etc/init.d/lirc start".  The kludge does not work very well, so
systemd often does not know what things it runs that way are actually
doing.  If they stop, it does not seem to detect that and fails to
restart them.  That may be what happened to you.

When I do "systemctl disable lirc" and "systemctl start lirc" on my
16.04 system, it works - I can do "ps -e | grep lirc" and see that
lircd is running.  So there must be something different about your
16.04 that is not making that work.

Anyway, the correct way to reverse a "systemctl disable lirc" command
is actually to do "systemctl enable lirc".  Using
"/lib/systemd/systemd-sysv-install" directly is a bad idea - it is an
internal part of systemd not intended to be used directly.  In your
case, it looks like it has worked, but I would recommend doing this:

sudo /lib/systemd/systemd-sysv-install disable lirc
sudo systemctl enable lirc
sudo systemctl restart lirc

That should get you back to where you were.

Now that you are running 16.04, I think it would be a good idea for
you to start learning about systemd.  It is very different from what
you are used to in older versions of Ubuntu, which used to run SysV
init.d at first, and more recently Upstart, which had its control
files in /etc/init (note: no .d on the end of that).  Upstart was very
compatible with SysV init.d and things like lirc that still used
init.d worked well, so you may not have noticed that change.  Systemd
is not so compatible, and in 18.04 most things that used to use init.d
have been migrated to directly use systemd.


More information about the mythtv-users mailing list