[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to bind special button to ifup/ifdown

On Tue, 2007-03-06 at 12:59 -0500, Stefan Monnier wrote:
> 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
> "transparently".

Hi Stefan,

Ditto for my HP Compaq nx6320.  I find that when I disable the wifi the
daemon exits and (possibly) the module is unloaded.

When I re-enable the wifi I need to "modprobe ipw3945" which also
manages to restart the daemon (there must be some special magic there
somewhere, but I haven't investigated much further.

At that point network-manager seems to pick up on things and crank up my
wireless network fine.

It's possible that there is an ACPI event that happens, and I might
investigate that further.  If there is then adding something
to /etc/acpi/events is probably the best way to go.

Do you see any acpi events at all?  I've made some small changes to my
system to log all acpi events, like:

==================== /etc/acpi/events/allevents ===
# /etc/acpi/events/allevents
# This is called when any ACPI event happens
# /etc/acpi/log_event is called to log the event

# Optionally you can specify the placeholder %e. It will pass
# through the whole kernel event message to the program you've
# specified.

action=/etc/acpi/log_event "%e"

==================== /etc/acpi/events/log_event ===

logger -t 'acpi-allevents' "Received ACPI event =>$1<="

So that I can see every ACPI event in syslog.

					Andrew McMillan.

Andrew @ Catalyst .Net .NZ  Ltd,  PO Box 11-053, Manners St,  Wellington
WEB: http://catalyst.net.nz/            PHYS: Level 2, 150-154 Willis St
DDI: +64(4)803-2201      MOB: +64(272)DEBIAN      OFFICE: +64(4)499-2267
     A foolish consistency is the hobgoblin of little minds -- Shaw

Reply to: