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

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
raspi-config (20190429) buster; urgency=medium
* Update do_wifi_country
- Enable wifi regardless of whether /run/wifi-country-unset exists
-- Serge Schneider <serge@raspberrypi.org> Mon, 29 Apr 2019 14:52:56 +0100
raspi-config (20190424) stretch; urgency=medium raspi-config (20190424) stretch; urgency=medium
* Add Compton option to advanced options * Add Compton option to advanced options

View File

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