[arch-projects] [netcfg] [PATCH] wifi-menu: fix name of wireless key variable

Tasos Latsas tlatsas2000 at gmail.com
Sat Jun 30 04:07:45 EDT 2012


Dialog returns the wireless key in variable $key. Uppercase
'KEY' is used later to create the profile.

Signed-off-by: Tasos Latsas <tlatsas2000 at gmail.com>
---
 scripts/wifi-menu | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/wifi-menu b/scripts/wifi-menu
index e182f25..ba8eb47 100755
--- a/scripts/wifi-menu
+++ b/scripts/wifi-menu
@@ -115,7 +115,7 @@ create_profile()
         [[ "$OBSCURE" ]] && box="--insecure --passwordbox" || box="--inputbox"
         msg="Enter $security security key for\n'$1'"
         key=$(dialog $box "$msg" 10 40 --stdout) || return $?
-        [[ "${#KEY}" -ge 8 && "${#KEY}" -le 63 ]] || return 4
+        [[ "${#key}" -ge 8 && "${#key}" -le 63 ]] || return 4
         if [[ "$OBSCURE" ]]; then
             key=$(wpa_passphrase "$1" "$key" | grep -m 1 "^[[:space:]]*psk=")
             key="KEY=${key#*psk=}"
-- 
1.7.11.1


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.archlinux.org/pipermail/arch-projects/attachments/20120630/a22121b6/attachment.asc>


More information about the arch-projects mailing list