summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTasos Latsas <tlatsas2000@gmail.com>2012-06-30 10:07:45 +0200
committerJouke Witteveen <j.witteveen@gmail.com>2012-06-30 17:39:42 +0200
commit9eb995ef8a34d552077b2af02787574a6534b1e2 (patch)
tree3ed59445c302e7a1e1ba8f63321ca7ee44517710
parent91c29a1cf6683fcd2640bca1437b40ef429265c3 (diff)
downloadnetctl-9eb995ef8a34d552077b2af02787574a6534b1e2.tar.gz
netctl-9eb995ef8a34d552077b2af02787574a6534b1e2.tar.xz
wifi-menu: fix name of wireless key variable
Dialog returns the wireless key in variable $key. Uppercase 'KEY' is used later to create the profile. Signed-off-by: Tasos Latsas <tlatsas2000@gmail.com>
-rwxr-xr-xscripts/wifi-menu2
1 files changed, 1 insertions, 1 deletions
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=}"