[mythtvnz] hdhomerun doesn't connect on restart when connected directly to the lan port

Paulgir paulgir at gmail.com
Wed Apr 24 05:51:19 BST 2013


>
> I have never liked link-local addresses - I always use manually
> assigned static addresses instead if at all possible, as nothing can
> go wrong with them.  Does the HDHomerun do static addresses?
>
> It is also possible that there is a timing issue.  After the problem
> happens, if you restart mythbackend ("restart mythbackend" from a root
> prompt), does the HDHomerun start working?  If so, it may be that
> mythbackend is starting before the HDHomerun has had its ethernet
> connection come up.  If that is the case, a simplistic fix is just to
> add some delay before mythbackend starts.  In
> /etc/init/mythtv-backend.conf, find the line where it runs
> /usr/bin/mythbackend and add a line before that with say "sleep 10" to
> give a 10 second delay.  A better solution would make changes to the
> "start on" line to make the startup wait for the HDHomerun being
> visible, but that gets quite complicated and way above my skill level
> with Upstart.
>

I carried out Stephen's suggestion: adding a waiting period to
mythtv-backend.conf:

# MythTV Backend service

description     "MythTV Backend"
author          "Mario Limonciello <superm1 at ubuntu.com>"

start on (local-filesystems and net-device-up IFACE!=lo and started  
udev-finish)
stop on runlevel [016]

#expect fork
respawn
respawn limit 2 3600

pre-start script
     [ -x /usr/sbin/mysqld ] || exit 0
     for i in `seq 1 30` ; do
        /usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping &&  
exit 0
        sleep .5
     done
end script

script
         test -f /etc/default/locale && . /etc/default/locale || true
sleep 10
         LANG=$LANG /usr/bin/mythbackend --syslog local7 --user mythtv
end script




Seems to work ok
Paul



More information about the mythtvnz mailing list