Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

12345678910111213141516171819202122232425262728293031
  1. #!/bin/bash -e
  2. install -v -d "${ROOTFS_DIR}/etc/systemd/system/dhcpcd.service.d"
  3. install -v -m 644 files/wait.conf "${ROOTFS_DIR}/etc/systemd/system/dhcpcd.service.d/"
  4. install -v -d "${ROOTFS_DIR}/etc/wpa_supplicant"
  5. install -v -m 600 files/wpa_supplicant.conf "${ROOTFS_DIR}/etc/wpa_supplicant/"
  6. if [ -v WPA_COUNTRY ]; then
  7. echo "country=${WPA_COUNTRY}" >> "${ROOTFS_DIR}/etc/wpa_supplicant/wpa_supplicant.conf"
  8. fi
  9. if [ -v WPA_ESSID ] && [ -v WPA_PASSWORD ]; then
  10. on_chroot <<EOF
  11. set -o pipefail
  12. wpa_passphrase "${WPA_ESSID}" "${WPA_PASSWORD}" | tee -a "/etc/wpa_supplicant/wpa_supplicant.conf"
  13. EOF
  14. elif [ -v WPA_ESSID ]; then
  15. cat >> "${ROOTFS_DIR}/etc/wpa_supplicant/wpa_supplicant.conf" << EOL
  16. network={
  17. ssid="${WPA_ESSID}"
  18. key_mgmt=NONE
  19. }
  20. EOL
  21. fi
  22. # Disable wifi on 5GHz models
  23. mkdir -p "${ROOTFS_DIR}/var/lib/systemd/rfkill/"
  24. echo 1 > "${ROOTFS_DIR}/var/lib/systemd/rfkill/platform-3f300000.mmcnr:wlan"
  25. echo 1 > "${ROOTFS_DIR}/var/lib/systemd/rfkill/platform-fe300000.mmcnr:wlan"