# [SOLVED] bash breaks wpa_supplicant?

## zigver

Upgrading bash to latest stable (3.1_p16) breaks wpa_supplicant for me.  Dropping back to 3.0 versions of bash results in wpa_supplicant working just fine.

Didn't see anything posted on this yet so am I the only one having this problem?Last edited by zigver on Mon Apr 17, 2006 3:19 pm; edited 1 time in total

----------

## salivian

Yes ... I am experiencing the same problem ...

apparently, 3.1 handles array assignments differently from the older versions.

take a look at /lib/rcscripts/net.modules.d/wpa_supplicant

change the line  in wpa_supplicant_associated() to 

local -a status=( $( wpa_cli -i${1} status | awk -F= '/^key_mgmt|^wpa_state|^EAP state/ { print ""$2"" }' ) )

partially fixes the problem for me ... it seems that certain double quotes(") are problematic ...  the script will at least not running into a dead loop without grepping the associated status and time out.

----------

## John-Boy

Many thanks for the tip, that's got it going for me.

----------

## stivani

I have the same problem.

bash-3.1_p16

wpa_supplicant-0.4.8

The workaround suggested bij salivian works for me.

----------

## shugaa

Same problem here after the bash update. The fix suggested by salivian works fine for me. 

Thank you!!

----------

## WFrag

I found the solution here: http://dev.croup.de/proj/gentoo-vps/browser/baselayout-vserver/trunk/net-scripts/net.modules.d/wpa_supplicant.sh

The solution is to split the problem line into two following lines:

 *Quote:*   

> 
> 
> local -a status
> 
> eval status=( "$( wpa_cli -i${1} status | awk -F= '/^key_mgmt|^wpa_state|^EAP state/ { print "\""$2"\"" }' )" )
> ...

 

----------

## ronmon

Apparently it has already been changed in baselayout-1.12.0_pre17. The file is now called wpa_supplicant.sh (.sh appended) and contains the fix that WFrag linked to. wpa is working fine for me.

----------

## BlackWolfie

 *WFrag wrote:*   

> I found the solution here: http://dev.croup.de/proj/gentoo-vps/browser/baselayout-vserver/trunk/net-scripts/net.modules.d/wpa_supplicant.sh
> 
> The solution is to split the problem line into two following lines:
> 
>  *Quote:*   
> ...

 

Had the same problem this morning. This solution worked for me. Thanks.   :Very Happy: 

----------

## blubbi

Same problem here.

That fixed it.

Thanks a lot!

regards

blubbi

----------

## salivian

This is the official bug that tracks the problem.  The dev patches are there too.

https://bugs.gentoo.org/show_bug.cgi?id=130104

by the way, I can say that the new baselayout-1.12.0_pre17 works well too, but there is quite a bit of init script architecture change too.

----------

## zigver

Thanks salivain, work around fixed it.

----------

