Hello Joerg, * Joerg Beyer <[EMAIL PROTECTED]> [2005-01-16 16:14]: > Dear Listreader, > > I have a debian laptop with wlan and ethernet. Both for itself work > (configured in /etc/network/interfaces), but I cant get the switching > between them get working automaticly. > > How do I configure the laptop, that it uses eth0 if only eth0 or both > (eth0 and wlan0) are connected and wlan0 if only wlan0 is connected?
i use only wlan or eth0. i wrote this script:
#!/bin/bash
ret=`lsmod | awk '{print $1}' | grep -c ipw2100`
if [ $ret = "1" ] ; then
/sbin/modprobe -r ipw2100
echo 0 > /proc/acpi/asus/wled
route del default gw 192.168.1.1 dev eth1
ifup eth0
/etc/init.d/ddclient start
else
/etc/init.d/ddclient stop
modprobe ipw2100
echo 1 > /proc/acpi/asus/wled
iwconfig eth1 power off
iwconfig eth1 mode Managed
iwconfig eth1 essid any
ifconfig eth1 192.168.1.2
route add default gw 192.168.1.1 dev eth1
ifdown eth0
fi
myabe it helps.
regards nico
--
Nico Golde - [EMAIL PROTECTED] | GPG: 1024D/73647CFF ,'"`.
[EMAIL PROTECTED] | http://www.ngolde.de ( grml.org
VIM has two modes - the one in which it beeps `._,'
and the one in which it doesn't -- encrypted mail preferred
signature.asc
Description: Digital signature

