The fix is a bit complicated - you have to make a systemd unit that
tests for the Ethernet interface actually being up and able to pass
traffic, and then have mythbackend wait on that unit before it is
started. The tools to do this are on my web server. If you are not
running a server version of Ubuntu and have not disabled
NetworkManager, run the following commands to set it all up. Watch
out for line wrapping - my email client does that with longer lines
such as the wget commands, so the wget and the URL after it should be
on one line.
sudo su
cd /usr/local/bin
wget
http://www.jsw.gen.nz/mythtv/wait-until-pingable.py
chmod u=rwx,g=r,o=r wait-until-pingable.py
systemctl enable NetworkManager-wait-online.service
systemctl start NetworkManager-wait-online.service
cd /etc/systemd/system
mkdir mythtv-backend.service.d
chmod u=rwx,g=rx,o=rx mythtv-backend.service.d
cd mythtv-backend.service.d
wget
http://www.jsw.gen.nz/mythtv/mythtv-bac ... gable.conf
chmod u=rw,g=r,o=r mythtv-backend-wait-until-pingable.conf
cd ..
wget
http://www.jsw.gen.nz/mythtv/local-netw ... le.service
chmod u=rw,g=r,o=r local-network-pingable.service
Here you will need to change the text in
local-network-pingable.service where it says "switch.jsw.gen.nz" and
replace that with the IP address or DNS name of your first network
tuner (if the tuner is pingable), or otherwise something on your
network such as your switch or router that is normally pingable when
your MythTV box is booting.
Use nano or your favourite editor:
nano local-network-pingable.service
Then save the change and exit from nano or your editor and do these
commands:
systemctl enable local-network-pingable.service
systemctl start local-network-pingable.service
systemctl status local-network-pingable.service
The systemctl status command should show that the
local-network-pingable.service has started and the ping worked. If
not, fix that before proceeding. Then do these commands:
systemctl daemon-reload
exit
After that, on boot mythbackend will wait for either the ping to work,or the 30 second timeout specified in the
local-network-pingable.service file. If you want to change that
timeout, it is the "30" after the ping address.
===================