[mythtv-users] Auto-started Mythbackend = Remote Mythfrontend connection failure

Thomas Mashos thomas at mashos.com
Fri Nov 16 15:35:23 UTC 2012


On Fri, Nov 16, 2012 at 6:18 AM, Darethehair <darethehair at gmail.com> wrote:

> [Can I respond to the thread that I started this way, without starting a
> fresh thread?  I guess I will find out.  Didn't the old 'nabble' system
> allow one to read and post from a web page?]
>
> Thanks for the comments so far, folks, but it is looking tricky.  I
> whipped up my own version of a quick-and-dirty 'wait for network' script
> that looks like this:
>
> wait4net.sh
> ----------------
> #!/bin/bash
>
> /sbin/ifconfig | grep "192.168" > /dev/null 2> /dev/null
> status=$?
>
> counter=1
> max=$1
>
> while [ $status != 0 ]; do
>     sleep 1
>     /sbin/ifconfig | grep "192.168" > /dev/null 2> /dev/null
>     status=$?
>     echo $(date) "not yet!" "attempt: $counter"
>     if [ $counter -ge $max ]; then
>         echo "giving up after $counter attempts!"
>         exit
>     fi
>     counter=$((counter+1))
> done
> echo $(date) "success!" "after attempt: $counter"
> /sbin/ifconfig
>
> Then, as the first executable line in '/etc/init.d/mythtv-backend', I
> added a call to that script:
>
> /usr/local/bin/wait4net.sh 120 > /tmp/wait4net.out 2> /tmp/wait4net.err
>
> After a few attempts, I have confirmed that my script 'gives up waiting'
> for a valid '192.168.x.x' entry to show up in 'ifconfig' output -- even
> after 2 minutes.  Yes, it is a wireless connection that I am running my
> mythbackend on, but this is plenty generous in time given.
>
> Either I am misunderstanding something, *or* what is actually happening is
> that my (wireless) network is waiting till *after* the 'mythtv-backend'
> scripts runs/completes to execute -- in which case it would be pointless
> for me to wait in this way.  Does anyone know offhand what order stuff
> happens in during bootup?
>
> Thanks
> ______________________________**_________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://www.mythtv.org/mailman/**listinfo/mythtv-users<http://www.mythtv.org/mailman/listinfo/mythtv-users>
>


The networking doesn't wait for the backend to come up (if it did, what
would happen on systems without a backend?). The backend will wait for some
networking to come up before it starts (networking that isn't lo).

How long does it take your system to boot up completely?

Thanks,

Thomas Mashos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20121116/47ed9bfe/attachment.html>


More information about the mythtv-users mailing list