On Fri, Nov 16, 2012 at 6:18 AM, Darethehair <span dir="ltr"><<a href="mailto:darethehair@gmail.com" target="_blank">darethehair@gmail.com</a>></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't the old 'nabble' 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 'wait for network' script that looks like this:<br>
<br>
wait4net.sh<br>
----------------<br>
#!/bin/bash<br>
<br>
/sbin/ifconfig | grep "192.168" > /dev/null 2> /dev/null<br>
status=$?<br>
<br>
counter=1<br>
max=$1<br>
<br>
while [ $status != 0 ]; do<br>
sleep 1<br>
/sbin/ifconfig | grep "192.168" > /dev/null 2> /dev/null<br>
status=$?<br>
echo $(date) "not yet!" "attempt: $counter"<br>
if [ $counter -ge $max ]; then<br>
echo "giving up after $counter attempts!"<br>
exit<br>
fi<br>
counter=$((counter+1))<br>
done<br>
echo $(date) "success!" "after attempt: $counter"<br>
/sbin/ifconfig<br>
<br>
Then, as the first executable line in '/etc/init.d/mythtv-backend', I added a call to that script:<br>
<br>
/usr/local/bin/wait4net.sh 120 > /tmp/wait4net.out 2> /tmp/wait4net.err<br>
<br>
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.<br>
<br>
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?<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'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). </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>