summaryrefslogtreecommitdiffstats
path: root/package/hostapd/files
diff options
context:
space:
mode:
authorthepeople <thepeople@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-03-24 00:19:42 +0000
committerthepeople <thepeople@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-03-24 00:19:42 +0000
commitbc38a415b6a44559b809b10348a8ac4f9fa434d1 (patch)
treeb968f0018dfee2fcfce7ee6bcc55e990cca8c141 /package/hostapd/files
parent52cf5276c23d93436b50fc48677be15f2307389c (diff)
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
Diffstat (limited to 'package/hostapd/files')
-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 a9f8ca132..b6499e6c6 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
;;