Fixes: #11475
Signed-off-by: Jonatan Schlag jonatan.schlag@ipfire.org --- src/functions/functions.wireless-networks | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/src/functions/functions.wireless-networks b/src/functions/functions.wireless-networks index 4fedcb9..58256b9 100644 --- a/src/functions/functions.wireless-networks +++ b/src/functions/functions.wireless-networks @@ -49,7 +49,7 @@ cli_wireless_network() { local handle="$(wireless_network_hash "${ssid}")"
case "${key}" in - modes|pre_shared_key|priority) + hidden|modes|pre_shared_key|priority) wireless_network_${key} "${handle}" "$@" ;; show) @@ -364,6 +364,26 @@ wireless_network_modes() { fi }
+wireless_network_hidden() { + if [ ! $# -eq 2 ]; then + log ERROR "Not enough arguments" + return ${EXIT_ERROR} + fi + + local handle=${1} + local hidden=${2} + + if ! isbool hidden; then + log ERROR "Invalid value '${hidden}'" + return ${EXIT_ERROR} + fi + + if ! wireless_network_write_config_key "${handle}" "HIDDEN" "${hidden}"; then + log ERROR "Could not write configuration settings" + return ${EXIT_ERROR} + fi +} + wireless_network_pre_shared_key() { if [ ! $# -eq 2 ]; then log ERROR "Not enough arguments"