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