From 119bd00f7b67a0c2491179453f15e8603f2aa9ec Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 21 Oct 2016 10:33:40 +0100 Subject: [PATCH] Only write wifi interface if parameters are given --- src/freedombone-utils-wifi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/freedombone-utils-wifi b/src/freedombone-utils-wifi index a9278973..ecd36d12 100755 --- a/src/freedombone-utils-wifi +++ b/src/freedombone-utils-wifi @@ -368,13 +368,12 @@ function networks_from_file { } function create_networks_interactive { + remove_config_param "WIFI_INTERFACE" update_wifi_adaptors if [ ! $IFACE ]; then # Don't try to configure wifi if there are no adaptors - remove_config_param "WIFI_INTERFACE" return fi - write_config_param "WIFI_INTERFACE" "$WIFI_INTERFACE" if [ -f $WIFI_NETWORKS_FILE ]; then rm $WIFI_NETWORKS_FILE @@ -433,9 +432,11 @@ function create_networks_interactive { if [ ${#WIFI_SSID} -gt 1 ]; then if [ ${#WIFI_TYPE} -gt 1 ]; then if [[ "${WIFI_TYPE}" == $'none' || "${WIFI_TYPE}" == $'open' ]]; then + write_config_param "WIFI_INTERFACE" "$WIFI_INTERFACE" return else if [ ${#WIFI_PASSPHRASE} -gt 1 ]; then + write_config_param "WIFI_INTERFACE" "$WIFI_INTERFACE" return fi fi