On Fri, Nov 16, 2012 at 6:18 AM, Darethehair <span dir="ltr">&lt;<a href="mailto:darethehair@gmail.com" target="_blank">darethehair@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

[Can I respond to the thread that I started this way, without starting a fresh thread?  I guess I will find out.  Didn&#39;t the old &#39;nabble&#39; system allow one to read and post from a web page?]<br>
<br>
Thanks for the comments so far, folks, but it is looking tricky.  I whipped up my own version of a quick-and-dirty &#39;wait for network&#39; script that looks like this:<br>
<br>
wait4net.sh<br>
----------------<br>
#!/bin/bash<br>
<br>
/sbin/ifconfig | grep &quot;192.168&quot; &gt; /dev/null 2&gt; /dev/null<br>
status=$?<br>
<br>
counter=1<br>
max=$1<br>
<br>
while [ $status != 0 ]; do<br>
    sleep 1<br>
    /sbin/ifconfig | grep &quot;192.168&quot; &gt; /dev/null 2&gt; /dev/null<br>
    status=$?<br>
    echo $(date) &quot;not yet!&quot; &quot;attempt: $counter&quot;<br>
    if [ $counter -ge $max ]; then<br>
        echo &quot;giving up after $counter attempts!&quot;<br>
        exit<br>
    fi<br>
    counter=$((counter+1))<br>
done<br>
echo $(date) &quot;success!&quot; &quot;after attempt: $counter&quot;<br>
/sbin/ifconfig<br>
<br>
Then, as the first executable line in &#39;/etc/init.d/mythtv-backend&#39;, I added a call to that script:<br>
<br>
/usr/local/bin/wait4net.sh 120 &gt; /tmp/wait4net.out 2&gt; /tmp/wait4net.err<br>
<br>
After a few attempts, I have confirmed that my script &#39;gives up waiting&#39; for a valid &#39;192.168.x.x&#39; entry to show up in &#39;ifconfig&#39; 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.<br>


<br>
Either I am misunderstanding something, *or* what is actually happening is that my (wireless) network is waiting till *after* the &#39;mythtv-backend&#39; 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?<br>


<br>
Thanks<br>
______________________________<u></u>_________________<br>
mythtv-users mailing list<br>
<a href="mailto:mythtv-users@mythtv.org" target="_blank">mythtv-users@mythtv.org</a><br>
<a href="http://www.mythtv.org/mailman/listinfo/mythtv-users" target="_blank">http://www.mythtv.org/mailman/<u></u>listinfo/mythtv-users</a><br>
</blockquote></div><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">The networking doesn&#39;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&#39;t lo). </div>

<div class="gmail_extra"><br></div><div class="gmail_extra">How long does it take your system to boot up completely?<br class=""><br clear="all">Thanks,<br><br>Thomas Mashos<br></div>