aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/examples
diff options
context:
space:
mode:
authorLed <ledest@gmail.com>2014-12-14 15:19:57 (GMT)
committerJouni Malinen <j@w1.fi>2014-12-14 16:27:54 (GMT)
commit2797486c4fa7fb91df29c9bbd6f95c2eebe29ad1 (patch)
tree1ae10ad32aa003da9f774601ab72d0945b14f706 /wpa_supplicant/examples
parent33c7eb810a33ff80bfe6f6c87b3602e042e95f22 (diff)
downloadhostap-2797486c4fa7fb91df29c9bbd6f95c2eebe29ad1.zip
hostap-2797486c4fa7fb91df29c9bbd6f95c2eebe29ad1.tar.gz
hostap-2797486c4fa7fb91df29c9bbd6f95c2eebe29ad1.tar.bz2
Fix bashisms in wps-ap-cli script
Option '-p' of 'read' command may be unsupported in some POSIX-complete shells. So replace 'read -p' with 'echo -n'/'read' pair. Signed-off-by: Oleksandr Chumachenko <ledest@gmail.com>
Diffstat (limited to 'wpa_supplicant/examples')
-rwxr-xr-xwpa_supplicant/examples/wps-ap-cli9
1 files changed, 6 insertions, 3 deletions
diff --git a/wpa_supplicant/examples/wps-ap-cli b/wpa_supplicant/examples/wps-ap-cli
index 7c6b0aa..cc2cff2 100755
--- a/wpa_supplicant/examples/wps-ap-cli
+++ b/wpa_supplicant/examples/wps-ap-cli
@@ -14,11 +14,13 @@ pbc()
enter_pin()
{
echo "Enter a PIN from a station to be enrolled to the network."
- read -p "Enrollee PIN: " pin
+ echo -n "Enrollee PIN: "
+ read pin
cpin=`$CLI wps_check_pin "$pin" | tail -1`
if [ "$cpin" = "FAIL-CHECKSUM" ]; then
echo "Checksum digit is not valid"
- read -p "Do you want to use this PIN (y/n)? " resp
+ echo -n "Do you want to use this PIN (y/n)? "
+ read resp
case "$resp" in
y*)
cpin=`echo "$pin" | sed "s/[^1234567890]//g"`
@@ -50,7 +52,8 @@ main_menu()
echo "3: Show current configuration"
echo "0: Exit wps-ap-cli"
- read -p "Command: " cmd
+ echo -n "Command: "
+ read cmd
case "$cmd" in
1)