Check wifi interface exists

This commit is contained in:
Bob Mottram 2016-10-21 15:13:48 +01:00
parent 88676079a1
commit 1c660aa45b
1 changed files with 5 additions and 0 deletions

View File

@ -344,6 +344,11 @@ function networks_from_file {
exit 4 exit 4
fi 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 [ ! -f /etc/network/interfaces_original ]; then
if ! grep -q "# wifi enabled" /etc/network/interfaces; then if ! grep -q "# wifi enabled" /etc/network/interfaces; then
cp /etc/network/interfaces /etc/network/interfaces_original cp /etc/network/interfaces /etc/network/interfaces_original