Only write to rfkill files on Pi

This commit is contained in:
Simon Long 2020-07-27 15:59:52 +01:00
parent 85c51fed1e
commit 71f74289eb
2 changed files with 11 additions and 3 deletions

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
raspi-config (20200727) buster; urgency=medium
* Disable initial rfkill for all platforms when setting wireless country
-- Simon Long <simon@raspberrypi.com> Mon, 27 Jul 2020 15:47:29 +0100
raspi-config (20200707) buster; urgency=medium
* Add boot ROM and boot order selection

View File

@ -559,9 +559,11 @@ do_wifi_country() {
fi
if hash rfkill 2> /dev/null; then
rfkill unblock wifi
for filename in /var/lib/systemd/rfkill/*:wlan ; do
echo 0 > $filename
done
if is_pi ; then
for filename in /var/lib/systemd/rfkill/*:wlan ; do
echo 0 > $filename
done
fi
fi
if [ "$INTERACTIVE" = True ]; then
whiptail --msgbox "Wireless LAN country set to $COUNTRY" 20 60 1