<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Dec 6, 2021 at 7:34 AM Werner Mahr <<a href="mailto:werner@vollstreckernet.de">werner@vollstreckernet.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Am Montag, 6. Dezember 2021, 12:29:03 CET schrieb Jim Abernathy:<br>
> I'm trying to clean up any race conditions that may exist in my<br>
> production backend since I have both HDHomeRun network tuners and PCIe<br>
> cards.<br>
<br>
Isn't just a dep of mythtv-backend on systemd-networkd-wait-online doing what <br>
you want?<br>
<br>
-- <br>
MfG usw.<br>
<br>
Werner Mahr<br></blockquote><div><br></div><div>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:</div><div>[Unit]<br>Wants=dev-dvb-adapter0-frontend0.device<br>After=dev-dvb-adapter0-frontend0.device<br>Wants=dev-dvb-adapter1-frontend0.device<br>After=dev-dvb-adapter1-frontend0.device<br>Wants=dev-dvb-adapter2-frontend0.device<br>After=dev-dvb-adapter2-frontend0.device<br>Wants=dev-dvb-adapter3-frontend0.device<br>After=dev-dvb-adapter3-frontend0.device<br><br>After=NetworkManager-wait-online.service<br><br><br>[Service]<br>ExecStop=/usr/local/bin/mythbackendstop.sh<br><br>SendSIGKILL=yes<br>TimeoutStopSec=10<br></div><div><br></div><div>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:</div><div>[Unit]<br>Wants=local-network-pingable.service<br>After=local-network-pingable.service<br></div><div><br></div><div> That service was listed in the original email.</div><div><br></div><div>The solution is solid, I just didn't understand the ExecStartPre= part.</div><div><br></div><div>Jim A</div><div><br></div></div></div>