Network starting after XBMC
#1
Question 
Hi All,

Hopefully this hasn't been posted before... I have been searching for hours and haven't come across anything.

I've just switched from Linux XBMC installed on Ubuntu to XBMC Live installed to disk. So far so good with one exception.

The XBMC program starts up a good 10 secs earlier than the network which means that the on start library update (all my media is on the network) doesn't do anything and the weather doesn't update. It also seems that once it fails to do these things on startup, it abandons them for the rest of the session. Eg if I go to Videos and select update library, it does nothing (although curiously, if I go into set content and select 'Run automated scan' it will do it?).

If after the machine has started, ssh into the box, kill the XBMC process and do a 'runXBMC &' to start XBMC again, it works perfectly. Library updates run, the weather etc all ok.

So my question is, is it possible to make XBMC wait for the network when booting?

Thanks,
Chris
Reply
#2
I've managed to work around my issue although its a bit hacky... i added the following to the end of the pre-start stanza in the upstart file (/etc/init/xbmc-live.conf)

Code:
IP=`ifconfig  | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'`

until [ $IP ]; do
  sleep 1;
  IP=`ifconfig  | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'`
done

Which basically makes xbmc wait for an IP address before start up. With the above in its current state though it means that it will never start without network (although thats fine for me, it useless w/o network).

Oddly, it doesn't work with a static IP, only DHCP. Im thinking that ipconfig will show a static ip before the network 'connection' is actually up, whereas with DHCP the IP can't be obtained until the 'connection' is properly up.

If anyone has any better ways to tackle this, I'd love to hear from you.

Thanks,
Chris
Reply

Logout Mark Read Team Forum Stats Members Help
Network starting after XBMC0