https://bugzilla.novell.com/show_bug.cgi?id=687676
https://bugzilla.novell.com/show_bug.cgi?id=687676#c2
--- Comment #2 from rens groenewegen 2011-04-14 20:36:32 UTC ---
==> The config file:
linux:~ # cat thuis.cnf
ctrl_interface=/var/run/wpa_supplicant
network={
ssid="seg0ka-lan-rgb"
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk="its_a_secret"
}
==> The dowlan script, that takes a conf file :
linux:~ # cat dowlan
#!/usr/bin/ksh
set -x
function setoff
{
echo setoff # set -x
ifdown wlan0
ifconfig wlan0 down
psg -nK wpa_supplicant
psg -nK dhcpcd
psg -nK dhclient
}
function iwscan
{
echo iwscan # set -x
iwlist wlan0 scan > /tmp/wilist
return $?
}
function setonwpa
{
echo setonwpa # set -x
[ $# -lt 1 ] && return 1
echo killing all daemons....
psg -nK wpa_supplicant
psg -nK dhcpcd
psg -nK dhclient
echo sleep 5
sleep 5
echo resuming....
iwconfig|grep wlan0
ifconfig|grep wlan0
wpa_supplicant -i wlan0 -c $1 -B -dd
return $?
}
function testdhc
{
echo testdhc # set -x
err=`dhcpcd-test wlan0 2>&1|grep -c -i timed`
return $err # ok = 0, error = 1
}
function dodhc
{
echo dodhc # set -x
dhcpcd wlan0
return $?
}
function waitforlink
{
echo waitforlink
while [ ` iwconfig |grep -c -i not-associated ` -gt 0 ]
do
sleep 2
echo -n "."
done
return $?
}
setoff
while true
do
iwscan
setonwpa $1 && waitforlink && testdhc && dodhc && break
done
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.