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 raspi-config (20200707) buster; urgency=medium
* Add boot ROM and boot order selection * Add boot ROM and boot order selection

View File

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