[mythtv-users] local-network-pingable.service

James Abernathy jfabernathy at gmail.com
Mon Dec 6 13:51:14 UTC 2021


On Mon, Dec 6, 2021 at 7:34 AM Werner Mahr <werner at vollstreckernet.de>
wrote:

> Am Montag, 6. Dezember 2021, 12:29:03 CET schrieb Jim Abernathy:
> > I'm trying to clean up any race conditions that may exist in my
> > production backend since I have both HDHomeRun network tuners and PCIe
> > cards.
>
> Isn't just a dep of mythtv-backend on systemd-networkd-wait-online doing
> what
> you want?
>
> --
> MfG usw.
>
> Werner Mahr
>

My system was built with Xubuntu 20.04 so it has NetworkManager instead of
systemd-networkd. Because my main tuner is a Hauppauge WinTV quadTV PCIe
card mythtv-backend has always started with access to tuners. I think that
is because of my mythtv-backend.service.d/mythtv-backend-override.conf file:
[Unit]
Wants=dev-dvb-adapter0-frontend0.device
After=dev-dvb-adapter0-frontend0.device
Wants=dev-dvb-adapter1-frontend0.device
After=dev-dvb-adapter1-frontend0.device
Wants=dev-dvb-adapter2-frontend0.device
After=dev-dvb-adapter2-frontend0.device
Wants=dev-dvb-adapter3-frontend0.device
After=dev-dvb-adapter3-frontend0.device

After=NetworkManager-wait-online.service


[Service]
ExecStop=/usr/local/bin/mythbackendstop.sh

SendSIGKILL=yes
TimeoutStopSec=10

However, when I add a HDHR quatro network tuner into the mix, there is
sometimes a race condition where the network is up
(NetworkManager-wait-online.service is satisfied), but the network tuner
doesn't respond at that point. Stephen's solution is waiting until the
tuner is pingable. So I also have a config file,
mythtv-backend.service.d/mythtv-backend-wait-until-pingable.conf:
[Unit]
Wants=local-network-pingable.service
After=local-network-pingable.service

 That service was listed in the original email.

The solution is solid, I just didn't understand the ExecStartPre= part.

Jim A
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20211206/6adcbe01/attachment.htm>


More information about the mythtv-users mailing list