[ltp] Getting ipw3945 kill switch to bring eth1 down?

Marc MERLIN linux-thinkpad@linux-thinkpad.org
Sun, 18 Nov 2007 19:37:24 -0800


On Mon, Nov 19, 2007 at 01:28:38AM -0200, Henrique de Moraes Holschuh wrote:
> On Sun, 18 Nov 2007, Marc MERLIN wrote:
> > Besides using a syslog parser to detect the kill switch line and running
> > ifconfig eth1 down, is there a better way to do this?
> 
> Yes.  Use thinkpad-acpi 0.18 from ibm-acpi.sf.net, open its input device,
> and listen for EV_SW SW_RADIO events.  You could also manually poll the
> sysfs attribute it exports with the state of the switch (thinkpad-acpi
> doesn't support poll() or select() on its attributes yet).

Good point, I can also poll that (I already have thinkpad-acpi), but the
idea is that I was hoping for a trigger more than a poll.
That said, if poll is the only way, I can go that way I guess.

So, for everyone else, when you shut off your wireless, your wireless
interface and routes are still up (going nowhere) until you remove them?

Marc
-- 
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems & security ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/