From a5ddbab348c9d47c553d15c1104f69c39d98f56d Mon Sep 17 00:00:00 2001 From: rtrimana Date: Thu, 22 Jun 2017 08:40:31 -0700 Subject: [PATCH] Changing the checking condition for wpa_key/wpa_passphrase; use -n (check whether the key is defined or not) instead of -e (check whether file exists or not) --- package/network/services/hostapd/files/hostapd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh index 534e49e0b4..2c01ed42ab 100644 --- a/package/network/services/hostapd/files/hostapd.sh +++ b/package/network/services/hostapd/files/hostapd.sh @@ -271,7 +271,7 @@ hostapd_set_bss_options() { # "option wpa_psk_file ''", # 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 -- 2.34.1