Only disable wifi if WPA_COUNTRY is not set

This commit is contained in:
Raphael Nestler 2020-06-04 17:02:03 +02:00
parent 9a3a10bf10
commit 522ee197b9

View File

@ -25,7 +25,12 @@ network={
EOL EOL
fi fi
# Disable wifi on 5GHz models # Disable wifi on 5GHz models if WPA_COUNTRY is not set
mkdir -p "${ROOTFS_DIR}/var/lib/systemd/rfkill/" mkdir -p "${ROOTFS_DIR}/var/lib/systemd/rfkill/"
if [ -v WPA_COUNTRY ]; then
echo 0 > "${ROOTFS_DIR}/var/lib/systemd/rfkill/platform-3f300000.mmcnr:wlan"
echo 0 > "${ROOTFS_DIR}/var/lib/systemd/rfkill/platform-fe300000.mmcnr:wlan"
else
echo 1 > "${ROOTFS_DIR}/var/lib/systemd/rfkill/platform-3f300000.mmcnr:wlan" echo 1 > "${ROOTFS_DIR}/var/lib/systemd/rfkill/platform-3f300000.mmcnr:wlan"
echo 1 > "${ROOTFS_DIR}/var/lib/systemd/rfkill/platform-fe300000.mmcnr:wlan" echo 1 > "${ROOTFS_DIR}/var/lib/systemd/rfkill/platform-fe300000.mmcnr:wlan"
fi