aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTravis Kemen <thepeople@openwrt.org>2010-03-24 00:19:42 +0000
committerTravis Kemen <thepeople@openwrt.org>2010-03-24 00:19:42 +0000
commite74fbc183b6746cc5469f3347aef424296c50233 (patch)
tree908d08bc622980ac899a459c3e58877122eb93c3
parentc63fd559fc358863b33912709c4e335dff1058ca (diff)
downloadupstream-e74fbc183b6746cc5469f3347aef424296c50233.tar.gz
upstream-e74fbc183b6746cc5469f3347aef424296c50233.tar.bz2
upstream-e74fbc183b6746cc5469f3347aef424296c50233.zip
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> SVN-Revision: 20394
-rw-r--r--package/hostapd/files/wpa_supplicant.sh15
1 files changed, 5 insertions, 10 deletions
diff --git a/package/hostapd/files/wpa_supplicant.sh b/package/hostapd/files/wpa_supplicant.sh
index a9f8ca1322..b6499e6c68 100644
--- a/package/hostapd/files/wpa_supplicant.sh
+++ b/package/hostapd/files/wpa_supplicant.sh
@@ -50,22 +50,17 @@ wpa_supplicant_setup_vif() {
*psk*)
key_mgmt='WPA-PSK'
config_get_bool usepassphrase "$vif" passphrase 1
+ if [ "$usepassphrase" = "1" ]; then
+ passphrase="psk=\"${key}\""
+ else
+ passphrase="psk=${key}"
+ fi
case "$enc" in
*psk2*)
proto='proto=RSN'
- if [ "$usepassphrase" = "1" ]; then
- passphrase="psk=\"${key}\""
- else
- passphrase="psk=${key}"
- fi
;;
*psk*)
proto='proto=WPA'
- if [ "$usepassphrase" = "1" ]; then
- passphrase="psk=\"${key}\""
- else
- passphrase="psk=${key}"
- fi
;;
esac
;;