]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
examples: Fix shellcheck warnings in wps-ap-cli
authorDavide Caratti <davide.caratti@gmail.com>
Mon, 10 Sep 2018 11:00:36 +0000 (13:00 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 22 Nov 2018 13:53:30 +0000 (15:53 +0200)
use 'printf' instead of 'echo -n', to suppress the following warning:

In POSIX sh, echo flags are undefined. [SC2039]

Signed-off-by: Davide Caratti <davide.caratti@gmail.com>
wpa_supplicant/examples/wps-ap-cli

index cc2cff2ebc24f2d6d78639a6dd0c14e041e5bb22..15d913ef1fae6b82426781969f48f103cd263644 100755 (executable)
@@ -14,12 +14,12 @@ pbc()
 enter_pin()
 {
        echo "Enter a PIN from a station to be enrolled to the network."
-       echo -n "Enrollee PIN: "
+       printf "Enrollee PIN: "
        read pin
        cpin=`$CLI wps_check_pin "$pin" | tail -1`
        if [ "$cpin" = "FAIL-CHECKSUM" ]; then
                echo "Checksum digit is not valid"
-               echo -n "Do you want to use this PIN (y/n)? "
+               printf "Do you want to use this PIN (y/n)? "
                read resp
                case "$resp" in
                        y*)
@@ -52,7 +52,7 @@ main_menu()
        echo "3: Show current configuration"
        echo "0: Exit wps-ap-cli"
 
-       echo -n "Command: "
+       printf "Command: "
        read cmd
 
        case "$cmd" in