[pkg-wpa-devel] Bug#361100: ifup does not supply all needed params
to wpasupplicants ifupdown.sh script
Steen Krøyer
steen at stortset.dk
Thu Apr 6 16:02:05 UTC 2006
Package: wpasupplicant
Version: 0.4.8-2
My system: Debian unstable, customised kernel 2.6.15, ipw2200 1.1.12.
The latest changes in wpasupplicant (0.4.8-1 and 0.4.8-2) broke
wpasupplicant for me. The problem seems to be that ifup fails to
set all the params (environment variables) needed by
/etc/wpa_supplicant/ifupdown.sh.
On my system, the environment present when ifupdown.sh is called due to
the link
/etc/network/if-pre-up.d/wpasupplicant-> etc/wpa_supplicant/ifupdown.sh,
looks like this
---------------
ADDRFAM=inet
BASH=/bin/sh
BASH_ARGC=()
BASH_ARGV=()
BASH_LINENO=([0]="0")
BASH_SOURCE=([0]="/etc/network/if-pre-up.d/wpasupplicant")
BASH_VERSINFO=([0]="3" [1]="1" [2]="14" [3]="1" [4]="release"
[5]="i486-pc-linux-gnu")
BASH_VERSION='3.1.14(1)-release'
DIRSTACK=()
EUID=0
GROUPS=()
HOSTNAME=laphroaig
HOSTTYPE=i486
IFACE=wlan
IFS='
'
IF_WIRELESS_ESSID=squirrel19
LOGICAL=wlan
MACHTYPE=i486-pc-linux-gnu
METHOD=dhcp
MODE=start
OPTERR=1
OPTIND=1
OSTYPE=linux-gnu
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PHASE=pre-up
POSIXLY_CORRECT=y
PPID=10085
PS4='+ '
PWD=/etc/wpa_supplicant
SHELL=/bin/bash
SHELLOPTS=braceexpand:hashall:interactive-comments:posix
SHLVL=2
TERM=dumb
UID=0
VERBOSITY=1
_=/bin/run-parts
---------------
That's a nogo since line 40-52 in ifupdown.sh looks like this:
---------------
if [ -s "$IF_WPA_CONF" ]; then
WPA_SUP_CONF="-c $IF_WPA_CONF"
WPA_SUP_CONF_CTRL_IFACE=$(sed -n -e 's/[ \t]*#.*//g;s/[
\t]*$//g;s/^ctrl_interface=//p' $IF_WPA_CONF)
if [ -n "$WPA_SUP_CONF_CTRL_IFACE" ]; then
WPA_COMMON_CTRL_IFACE="$WPA_SUP_CONF_CTRL_IFACE"
fi
elif env | grep -q "^IF_WPA"; then
WPA_SUP_CONF="-C $WPA_COMMON_CTRL_IFACE"
else
exit 0
fi
---------------
So the script bails out because there's no $IF_WPA.... set.
If ifup is not supposed to set all the necessary params,
presumably some other script is needed ... but am I then
missing some dependency? It's interesting too see that
a Google for IF_WPA_CONF returns a few hits to some
discussions of an interface setup that looks like this:
---------------
>On Mon, Feb 27, 2006 at 12:31:56AM +1000, Kel Modderman wrote:
>
>
>>Tonight I quickly whipped up the skeleton of some wpasupplicant ifupdown
>>hooks.
>>
>>They were tested with the very basic but common interfaces stanza:-
>>
>>iface ath0 inet dhcp
>> wpa-conf /etc/wpa_supplicant.conf
>> wpa-driver madwifi
>>
>>
>
>Wow! I love this idea! I think this is even better than the pre-up.d/
>post-down.d/ approach we tried before.
-----------------
Is wpa-conf something one is assume to install when using
wpasupplicant? The Debian site or Google reveals nothing
about wpa-conf. I can of course whip up my own script (I
have in fact done so to get my wireless lan up again).
/Steen Krøyer
More information about the Pkg-wpa-devel
mailing list