[pkg-wpa-devel] Bug#383907: Is there an easy way to check if an interface is managed by wpa_action?

Kel Modderman kelrin at tpg.com.au
Sun Aug 20 22:07:20 UTC 2006


On Monday 21 August 2006 00:02, Reinhard Tartler wrote:
> Package: wpasupplicant
> Version: 0.5.4-2
> Severity: wishlist
>
> Hi Kel,
>
> while tuning my suspend and resume scripts, I noticed that acpi-support
> contains code like this in
> /etc/acpi-support/suspend.d/55-down-interfaces.sh
>
> # Find the currently running network interfaces...
> INTERFACES=`/sbin/ifconfig | awk '/^[^ ]+/ {print $1}'`
>
> # And shut them down
> for x in $INTERFACES; do
>     ifdown $x down;
>     ifconfig $x down;
> done
>
>
> This of course fails if the interface is controlled by wpa-roam aka
> /sbin/wpa_action. I hardcased the check here for my interface, but it
> would be nice if acpi-support could be improved and call `wpa_action $x
> stop` by itself. For this we need to provide a reliable check if the
> interface is managed by wpa_action or not.

You can check for the location of the ctrl_interface domain socket (that may 
be in a different location according to config file used) or pidfile (which 
is what the wpa-ifupdown init script/hack uses to identify interfaces bound 
by wpa_supplicant/wpa_cli, and it is a fixed location).

Is this a workaround for #383168? If so, my current kludge is to have the 
suspend manager, in my case it was hibernate but now it is powersave, stop 
the wpa-ifupdown service on suspend.

Thanks, Kel.




More information about the Pkg-wpa-devel mailing list