How to bind special button to ifup/ifdown
My Acer TravelMate-3012 has special buttons to enable/disable bluetooth
and wifi. For bluetooth, when I hit the button it seems to cause
hotplugging the USB bluetooth device, so Linux handles it perfectly.
On the other hand, the wifi button doesn't seem to cause such
a hotplug event. It just disables/enables the proper functioning of the
wifi card (apparently at a hardware level) and sends e056/e055 keycodes.
The ipw3945 driver for the card correctly detects the thing (which it
refers to as "radio frequency kill switch").
This button works to the extent that when I use it to turn off the wireless,
it indeed turns it off, and even my wpa_supplicant ends up terminating.
But it doesn't work to bring up the interface: hitting the button just
enables the interface, but does not cause it to get configured. So I'd like
to bind something like the command "ifup eth2" to this button. I need this
binding to work whether I'm in X or not. I've found `funkey' which seems
to be able to do that, but it also seems to be too old for my kernel.
Another alternative would be to arrange for the ipw3925 driver to cause
hotplug events that udev or ifplugd understands, so it would work