From 1c660aa45b1fe4662899063af95e3d2ed87272f1 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 21 Oct 2016 15:13:48 +0100 Subject: [PATCH] Check wifi interface exists --- src/freedombone-utils-wifi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/freedombone-utils-wifi b/src/freedombone-utils-wifi index 070365ca..cdf315a1 100755 --- a/src/freedombone-utils-wifi +++ b/src/freedombone-utils-wifi @@ -344,6 +344,11 @@ function networks_from_file { exit 4 fi + if [[ $(config_param_exists "WIFI_INTERFACE") == "0" ]]; then + exit 5 + fi + read_config_param "WIFI_INTERFACE" + if [ ! -f /etc/network/interfaces_original ]; then if ! grep -q "# wifi enabled" /etc/network/interfaces; then cp /etc/network/interfaces /etc/network/interfaces_original