Cleanup redundant psk handling code in wpa_supplicant.sh.

(I sent this one to openwrt-devel before, but I am resending it as part of
this series because the next patch will also edit wpa_supplicant.sh).

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20394 3c298f89-4303-0410-b956-a3cf2f4a3e73
master
Travis Kemen 2010-03-24 00:19:42 +00:00
parent 8d3698602d
commit fd9e31f189
1 changed files with 5 additions and 10 deletions

View File

@ -50,22 +50,17 @@ wpa_supplicant_setup_vif() {
*psk*) *psk*)
key_mgmt='WPA-PSK' key_mgmt='WPA-PSK'
config_get_bool usepassphrase "$vif" passphrase 1 config_get_bool usepassphrase "$vif" passphrase 1
if [ "$usepassphrase" = "1" ]; then
passphrase="psk=\"${key}\""
else
passphrase="psk=${key}"
fi
case "$enc" in case "$enc" in
*psk2*) *psk2*)
proto='proto=RSN' proto='proto=RSN'
if [ "$usepassphrase" = "1" ]; then
passphrase="psk=\"${key}\""
else
passphrase="psk=${key}"
fi
;; ;;
*psk*) *psk*)
proto='proto=WPA' proto='proto=WPA'
if [ "$usepassphrase" = "1" ]; then
passphrase="psk=\"${key}\""
else
passphrase="psk=${key}"
fi
;; ;;
esac esac
;; ;;