Skip to content
Snippets Groups Projects
Commit 93425b35 authored by Bob Mottram's avatar Bob Mottram
Browse files

Check if wifi adaptors exist

parent 58401879
No related branches found
No related tags found
No related merge requests found
......@@ -1720,6 +1720,12 @@ function wifi_enable {
}
function menu_wifi {
if [[ "$(wifi_exists)" == "0" ]]; then
dialog --title $"Wifi" \
--msgbox $"No wifi adaptors were detected" 6 40
return
fi
while true
do
status_str=$'Wifi OFF'
......
......@@ -573,6 +573,14 @@ function count_wlan {
echo $ctr
}
function wifi_exists {
if grep -q "wlan" /proc/net/dev; then
echo "1"
else
echo "0"
fi
}
function remove_wifi_startup_script {
remove_config_param "WIFI_INTERFACE"
systemd_file=/etc/systemd/system/wifistart.service
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment