[ltp] Scripts for wireless

morpheus linux-thinkpad@linux-thinkpad.org
Sat, 29 Jan 2005 14:26:46 -0500


On Sat, 2005-01-29 at 12:38 +0100, Bob Alexander wrote:
> I'd like to get some good scripts to associate with Fn+Fn7 to 
> activate/deactivate and also a suggestion on how is the most clean way 
> to avoid automatic activation at boot time (Debian sid).
You should only need to remove the modules wlan, ath_pci and ath_hal.
Here is my script for Fedora, if you don't use modprobe substitute
insmod.
#!/bin/bash
lsmod | grep ath_pci
if [ "$?" == "0" ]; then
 modprobe -r ath_pci
 modprobe -r ath_hal
 modprobe -r wlan
else
 modprobe wlan
 modprobe ath_hal
 modprobe ath_pci
fi