Subject: Re: A few more questions...
To: None <port-macppc@NetBSD.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: port-macppc
Date: 10/22/2005 20:00:21
> 1) Does anyone know a way to have a machine automatically check for
> the presence of wired/wireless network(s) at boot and automatically
> choose to use whichever is present?
Well, it's not quite the same, but recently I dealt with a machine
which can have either of two network cards - ex0 or rtk0 - in it and I
wanted to have it use whichever was present. So I made rc.conf read
case " `ifconfig -l` " in
*" ex0 "*) net_interfaces="ex0";;
*" rtk0 "*) net_interfaces="rtk0";;
*) net_interfaces=""; rc_configured=NO;;
esac
and I hardlinked /etc/ifconfig.ex0 and /etc/ifconfig.rtk0 together.
I gather that in your case you always have the hardware present but
want to use whichever is showing carrier, which strikes me as a bit
harder; whether the above can be adapted to your case is another
question entirely. But you're welcome to steal the idea....
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML mouse@rodents.montreal.qc.ca
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B