On 14/02/08 15:28:11, Jonathan McDowell wrote:
On Thu, Feb 14, 2008 at 11:53:57AM +0000, Barry Samuels wrote:
My MythTV box doesn't have a keyboard or monitor and could be moved between TV aerial points. It has two network cards so can connect via cable or wireless.
Is there any way, at boot time, to get it to try the cable interface first and then, perhaps after a given time, to try the wireless interface and to keep trying both interfaces until it does find a connection?
I went for a script solution i.e. code in /etc/rc.local.
I've set both interfaces to be NON-auto. The script tries to bring up eth0 first (cable) and if that fails it tries ath0 (wireless). It's set to try both those interfaces up to 5 times and if it can't get a connection it shuts down.
The system complains about it shutting down from within rc.local but I assume I can ignore that.
A knockon effect is that because the network interface comes up last thing MySQL fails to start and, consequently, so does mythtv-backend. So I've added '/etc/init.d/mysql restart' and '/etc/init.d/mythtv- backend restart' to the end of rc.local.
It all seems to work.
Many thanks for the various suggestions.