Enable wifi regardless of whether /run/wifi-country-unset exists

This commit is contained in:
Serge Schneider
2019-04-29 14:56:59 +01:00
parent 0038aaeb18
commit 3729cabb4d
2 changed files with 8 additions and 2 deletions

View File

@@ -460,16 +460,16 @@ do_wifi_country() {
fi
if [ $? -eq 0 ];then
wpa_cli -i "$IFACE" set country "$COUNTRY"
wpa_cli -i "$IFACE" save_config > /dev/null 2>&1
if ! iw reg set "$COUNTRY" 2> /dev/null; then
ASK_TO_REBOOT=1
fi
if [ -f /run/wifi-country-unset ] && hash rfkill 2> /dev/null; then
if hash rfkill 2> /dev/null; then
rfkill unblock wifi
fi
if [ "$INTERACTIVE" = True ]; then
whiptail --msgbox "Wi-fi country set to $COUNTRY" 20 60 1
fi
wpa_cli -i "$IFACE" save_config > /dev/null 2>&1
fi
}