From: rtrimana Date: Thu, 22 Jun 2017 15:40:31 +0000 (-0700) Subject: Changing the checking condition for wpa_key/wpa_passphrase; use -n (check whether... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;ds=sidebyside;h=a5ddbab348c9d47c553d15c1104f69c39d98f56d;p=lede.git 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) --- 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