[ltp] Re: Disabling WLAN when it's not used
edonia
linux-thinkpad@linux-thinkpad.org
Mon, 31 May 2004 00:04:52 +0800
Am Sun, 30 May 2004 02:37:36 +0200 schrieb Edi Weitz:
> My T23 has Ethernet as well as built-in WLAN and I use both. At home I'm
> mostly using WLAN, when I'm visiting a customer where I'm very often I use
> Ethernet. I have Linux (Debian) configured to try both interfaces on
> startup so I can just boot the machine and will be online, i.e. in
> /etc/network/interfaces I have
>
> auto eth0
> iface eth0 inet dhcp
>
> auto eth1
> iface eth1 inet dhcp
> wireless-mode Managed
> wireless-key restricted blablablablablablabla wireless-essid AirPort
>
> and in /etc/dhcp3/dhclient.conf I have
>
> timeout 5;
>
> so I don't have to wait too long.
>
> But sometimes I'm on the road without network access at all. These are
> usually the same times when I'm on battery. Even if both interfaces don't
> find a suitable DHCP server I see two instances of dhclient in the output
> of ps all the time and ifconfig says that both eth0 and eth1 are UP.
>
> Does that mean that the WLAN card will consume battery power all the time?
> And if so, is there an automatic way (as opposed to issuing ifdown
> manually) to disable the card once it hasn't found a DHCP server?
>
> Thanks,
> Edi.
You may try to unload the kernel modules
rmmod modulename
edonia