I think you may be able to adjust /etc/rc.d/rc.inet1.conf to allow this by using the IFNAME[n] value. As far as I know /etc/rc.d/rc.inet1 goes through the value arrays from /etc/rc.d/rc.inet1/conf in numerical order so if you set up IFNAME[0]="wlan0" and IFNAME[1]="eth0" then wlan0 will be tried before eth0.
You'll have to add the IFNAME[0] and IFNAME[1] lines to /etc/rc.d/rc.inet1.conf as they aren't in standard Slackware installs. There is, however, an IFNAME[4] which is what made me think of it. You'll need to setup the rest of the values as well.
Looking at /etc/rc.d/rc.inet1 seems to bear this out with this bit being relevant - after sourcing the values from /etc/rc.d/rc.inet1.conf we have :
Code:
MAXNICS=6
i=0
while [ $i -lt $MAXNICS ];
do
IFNAME[$i]=${IFNAME[$i]:=eth${i}}
i=$(($i+1))
done
which looks like the IFNAME array is evaluated in numerical order. The interfaces are brought up like this :
Code:
for i in ${IFNAME[@]} ; do
if_up $i
done
This means changing the order should work. Here's an example /etc/rc.d/rc.inet1.conf - adjust to suit :
Code:
# Config information for wlan0:
IFNAME[0]="wlan0"
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="yes"
DHCP_HOSTNAME[0]=""
# Config information for eth0:
IFNAME[1]="eth0"
IPADDR[1]=""
NETMASK[1]=""
USE_DHCP[1]="yes"
DHCP_HOSTNAME[1]=""
I've not tried this but it should work I think. Note that if both interfaces get ther IP information via DHCP then the DNS and Gateway information will be overwritten by the last interface brought up. You may change this with these values :
Code:
DHCP_KEEPRESOLV[1]="yes"
DHCP_KEEPGW[1]="yes"
This stops the settings being overwritten. Note how the stanzas in /etc/rc.d/rc.inet1.conf are grouped together - the array index being a means of identifying the values for a particular interface.