Changing the checking condition for wpa_key/wpa_passphrase; use -n (check whether...
authorrtrimana <rtrimana@uci.edu>
Thu, 22 Jun 2017 15:40:31 +0000 (08:40 -0700)
committerrtrimana <rtrimana@uci.edu>
Thu, 22 Jun 2017 15:40:31 +0000 (08:40 -0700)
package/network/services/hostapd/files/hostapd.sh

index 534e49e0b4c4b5af8af8940387bcf51763bfcb1a..2c01ed42ab6c0cb09602f3e5d3d513ea2284e2c1 100644 (file)
@@ -271,7 +271,7 @@ hostapd_set_bss_options() {
                        # "option wpa_psk_file '<file_name>'",
                        # it will be the default key for any devices.
                        # Both options can be defined independently.
-                       if [ -e "$key" ]; then
+                       if [ -n "$key" ]; then
                                if [ ${#key} -lt 8 ]; then
                                        wireless_setup_vif_failed INVALID_WPA_PSK
                                        return 1