Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] bash breaks wpa_supplicant?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
zigver
Tux's lil' helper
Tux's lil' helper


Joined: 09 May 2003
Posts: 87

PostPosted: Sun Apr 16, 2006 1:28 am    Post subject: [SOLVED] bash breaks wpa_supplicant? Reply with quote

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
Back to top
View user's profile Send private message
salivian
Tux's lil' helper
Tux's lil' helper


Joined: 15 Sep 2002
Posts: 91

PostPosted: Sun Apr 16, 2006 3:47 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
John-Boy
Guru
Guru


Joined: 23 Jun 2004
Posts: 436
Location: Desperately seeking Moksha in all the wrong places

PostPosted: Sun Apr 16, 2006 7:04 am    Post subject: Reply with quote

Many thanks for the tip, that's got it going for me.
_________________
When you break rules, break 'em good and hard
Back to top
View user's profile Send private message
stivani
n00b
n00b


Joined: 19 Mar 2006
Posts: 9
Location: Belgium

PostPosted: Sun Apr 16, 2006 7:08 am    Post subject: Reply with quote

I have the same problem.
bash-3.1_p16
wpa_supplicant-0.4.8

The workaround suggested bij salivian works for me.
Back to top
View user's profile Send private message
shugaa
Tux's lil' helper
Tux's lil' helper


Joined: 18 Apr 2003
Posts: 87

PostPosted: Sun Apr 16, 2006 9:04 am    Post subject: Reply with quote

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

Thank you!!
Back to top
View user's profile Send private message
WFrag
n00b
n00b


Joined: 16 Apr 2006
Posts: 2

PostPosted: Sun Apr 16, 2006 12:49 pm    Post subject: Reply with quote

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"\"" }' )" )
Back to top
View user's profile Send private message
ronmon
Veteran
Veteran


Joined: 15 Apr 2002
Posts: 1043
Location: Key West, FL

PostPosted: Sun Apr 16, 2006 1:56 pm    Post subject: Reply with quote

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.
_________________
Ask Questions the Smart Way - by ESR
Back to top
View user's profile Send private message
BlackWolfie
n00b
n00b


Joined: 11 Oct 2003
Posts: 4

PostPosted: Sun Apr 16, 2006 7:44 pm    Post subject: Reply with quote

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:

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


Had the same problem this morning. This solution worked for me. Thanks. :D
_________________
-- espresso yourself --
Back to top
View user's profile Send private message
blubbi
Guru
Guru


Joined: 27 Apr 2003
Posts: 544
Location: Halle (Saale), Germany

PostPosted: Sun Apr 16, 2006 10:52 pm    Post subject: Reply with quote

Same problem here.

That fixed it.

Thanks a lot!

regards
blubbi
Back to top
View user's profile Send private message
salivian
Tux's lil' helper
Tux's lil' helper


Joined: 15 Sep 2002
Posts: 91

PostPosted: Mon Apr 17, 2006 1:40 am    Post subject: Reply with quote

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

http://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.
Back to top
View user's profile Send private message
zigver
Tux's lil' helper
Tux's lil' helper


Joined: 09 May 2003
Posts: 87

PostPosted: Mon Apr 17, 2006 3:19 pm    Post subject: Reply with quote

Thanks salivain, work around fixed it.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum