Only disable wifi if WPA_COUNTRY is not set (#416)
* Only disable wifi if WPA_COUNTRY is not set * Use '-n' instead of '-v' to test if WPA_COUNTRY is set Apparently -v doesn't work in all shells.
This commit is contained in:
parent
d88367000b
commit
8aed1b03e4
1 changed files with 8 additions and 3 deletions
|
@ -26,7 +26,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/"
|
||||||
echo 1 > "${ROOTFS_DIR}/var/lib/systemd/rfkill/platform-3f300000.mmcnr:wlan"
|
if [ -n "$WPA_COUNTRY" ]; then
|
||||||
echo 1 > "${ROOTFS_DIR}/var/lib/systemd/rfkill/platform-fe300000.mmcnr:wlan"
|
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-fe300000.mmcnr:wlan"
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in a new issue