The files you want to change are in /sys/class/leds and are symbolic links to the LED controls. You can do
Code:
stat /sys/class/leds/*
to see where the links point to, but it is unimportant.
TX and RX are for transfer and receive (respectively), and control behavior when transferring or receiving data; assoc takes over when the card connects to an access point; radio takes over before association takes place, and just lets you know if the card is active or not.
This script is perhaps a bit more elegant, and works if you have multiple effected wi-fi cards installed. It only allows blinking when connecting. The LED remains solid and on at all other times (when the wi-fi card is enabled or when it has a steady link). I find this behavior minimally invasive but still useful for debugging and troubleshooting network issues.
Code:
#!/bin/bash
if [ "$IFACE" = "wlan0" ]; then
for direc in /sys/class/leds/iwl-phy*X
do
echo none > $direc/trigger
# never trigger blinking for TX, RX
done
for direc in /sys/class/leds/iwl-phy*radio
do
echo none > $direc/trigger
# never trigger blinking for radio
done
# customize this loop to act on any relevant wi-fi cards
for direc in /sys/class/leds/iwl-phy0:assoc
do
echo phy0assoc > $direc/trigger
# do trigger blinking during association
done
fi
Place this script in /etc/network/if-up.d/ (call it whatever you want) and do
Code:
sudo chown root /etc/network/if-up.d/<script name>
sudo chmod a+x /etc/network/if-up.d/<script name>
This worked for me with Intrepid and works now on Jaunty RC. Hopefully it will work for other people, too!
Bookmarks