From: Michael Tremer Date: Fri, 18 Aug 2017 13:18:13 +0000 (+0200) Subject: wireless networks: Call pre-shared-key correctly X-Git-Url: http://git.ipfire.org/?p=people%2Fstevee%2Fnetwork.git;a=commitdiff_plain;h=364da6f459bd344ec296358b3b63664efb35ef07 wireless networks: Call pre-shared-key correctly The name "key" is used multiple times here. Once for the pre-shared-key of the network and secondly for the configuration field in the settings file. Signed-off-by: Michael Tremer --- diff --git a/src/functions/functions.wireless-networks b/src/functions/functions.wireless-networks index cd3c722f..7c71d9e5 100644 --- a/src/functions/functions.wireless-networks +++ b/src/functions/functions.wireless-networks @@ -19,7 +19,7 @@ # # ############################################################################### -WIRELESS_NETWORK_CONFIG_SETTINGS="ENCRYPTION_MODE KEY PRIORITY SSID" +WIRELESS_NETWORK_CONFIG_SETTINGS="ENCRYPTION_MODE PRIORITY PSK SSID" WIRELESS_NETWORKS_VALID_ENCRYPTION_MODES="WPA2-PSK" @@ -42,7 +42,7 @@ cli_wireless_network() { fi case "${key}" in - encryption_mode|key|priority) + encryption_mode|pre_shared_key|priority) wireless_network_${key} "${ssid}" "$@" ;; show) @@ -278,15 +278,15 @@ wireless_network_encryption_mode() { fi } -wireless_network_key() { +wireless_network_pre_shared_key() { if [ ! $# -eq 2 ]; then log ERROR "Not enough arguments" return ${EXIT_ERROR} fi local ssid="${1}" - local key="${2}" + local psk="${2}" - if ! wireless_network_write_config_key "${ssid}" "KEY" "${key}"; then + if ! wireless_network_write_config_key "${ssid}" "PSK" "${psk}"; then log ERROR "Could not write configuration settings" return ${EXIT_ERROR} fi