Backend requires restart to recognize hdhomerun tuners

For discussion of topics specific to MythTV on linux
oznrngr
Newcomer
Posts: 1
Joined: Sun Jan 22, 2017 11:38 pm
United States of America

Re: Backend requires restart to recognize hdhomerun tuners

Post by oznrngr »

Great post that saved me as well -- many thanks to bill6502!!!

For me, I added the "Requires=hdhomerun.service" line to the mythtv-backend.service file.
I'm using a Mythbuntu 16.04 load and this file was located at: /lib/systemd/system/mythtv-backend.service
Rebooted the machine and MythTV now brings up the live tv using the HD Homerun Tuners.
User avatar
bill6502
Developer
Posts: 2325
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Backend requires restart to recognize hdhomerun tuners

Post by bill6502 »

oznrngr,

You're better off using: sudo systemctl edit mythtv-backend.service and adding
the change there (it will go to /etc/systemd/system/mythtv-backend.d/override.conf.
If the /lib... file is changed, then if the package maintainer releases a new copy,
your change will vanish.
Glb1945
Junior
Posts: 28
Joined: Sat Jul 08, 2017 10:39 pm
United States of America

Re: Backend requires restart to recognize hdhomerun tuners

Post by Glb1945 »

Bill,

I worry about the casual user messing around in the system. Case in point:

add: ExecPreStart=sleep 10 (or append: ;sleep 10 to an existing ExecPreStart line)

There is no ExecPreStart but there is a ExecStartPre. So if the casual user followed your suggestions they would be even more confused.
And I tried executing the command

copy the existing service: sudo systemctl cat mythtv-backend.service > /etc/systemd/system/mythtv-backend.service

multiple times without success. And I am a reasonable knowledgable Unix user. Surely there are fixes to the software that would preclude the user from messing with the OS in this detail?

Jerry
User avatar
bill6502
Developer
Posts: 2325
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Backend requires restart to recognize hdhomerun tuners

Post by bill6502 »

Thanks for spotting the errors Jerry, they've been fixed (can't redirect the
output of an sudo command,)

I can't speak to any modifications to the backend that would it allow it to
start up when the network isn't there. So the systemd/Upstart/SysV solution
is up to the distribution and/or the user.

Initially, mythbuntu has the systemd-networkd-wait-online.service, but folks running their
server version (as opposed to the desktop) didn't have the underlying
program that the target uses. So it was removed. That would have
made life easier for folks. Waiting on tuners has always been a custom
solution and there are Wiki pages for them.
Glb1945
Junior
Posts: 28
Joined: Sat Jul 08, 2017 10:39 pm
United States of America

Re: Backend requires restart to recognize hdhomerun tuners

Post by Glb1945 »

Bill,
There must be linux commands that check if a wired or wireless network is up, e.g., if up? Why couldn't that software be added at the beginning of the mythtv backend software to at least fix the network problem? And the mythtv-setup can determine if there are tuners available so shouldn't that software be possible to add to the mythtv backend software?

Jerry
Glb1945
Junior
Posts: 28
Joined: Sat Jul 08, 2017 10:39 pm
United States of America

Re: Backend requires restart to recognize hdhomerun tuners

Post by Glb1945 »

Bill,
The commands iwconfig or ioctl seem to let one know what is up or down?

Jerry
Glb1945
Junior
Posts: 28
Joined: Sat Jul 08, 2017 10:39 pm
United States of America

Re: Backend requires restart to recognize hdhomerun tuners

Post by Glb1945 »

Bill ,

It also looks like nmcli tells one about the status of connections?

Jerry
Post Reply