Setting Wi-Fi country no longer requires a reboot

This commit is contained in:
Serge Schneider 2018-02-28 17:30:37 +00:00
parent 9895c6cfc8
commit 0c055b6ab7
3 changed files with 13 additions and 2 deletions

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
raspi-config (20180228) stretch; urgency=medium
* Setting Wi-Fi country no longer requires a reboot
-- Serge Schneider <serge@raspberrypi.org> Wed, 28 Feb 2018 17:28:50 +0000
raspi-config (20171201) stretch; urgency=medium raspi-config (20171201) stretch; urgency=medium
* Add pixel doubling option * Add pixel doubling option

2
debian/control vendored
View File

@ -10,6 +10,6 @@ Vcs-Browser: https://github.com/RPi-Distro/raspi-config
Package: raspi-config Package: raspi-config
Architecture: all Architecture: all
Depends: ${misc:Depends}, whiptail, parted, lua5.1, alsa-utils, psmisc Depends: ${misc:Depends}, whiptail, parted, lua5.1, alsa-utils, psmisc
Recommends: triggerhappy Recommends: triggerhappy, iw
Description: Raspberry Pi configuration tool Description: Raspberry Pi configuration tool
A simple configuration tool for common Raspberry Pi administrative tasks A simple configuration tool for common Raspberry Pi administrative tasks

View File

@ -447,10 +447,15 @@ do_wifi_country() {
else else
echo "country=$COUNTRY" > /etc/wpa_supplicant/wpa_supplicant.conf echo "country=$COUNTRY" > /etc/wpa_supplicant/wpa_supplicant.conf
fi fi
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
rfkill unblock wifi
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
ASK_TO_REBOOT=1
fi fi
IFS=$oIFS IFS=$oIFS
} }