Check if wifi adaptors exist
This commit is contained in:
parent
584018797a
commit
93425b3577
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue