c72f0b47ff
Allows essid and passwords with special characters.
19 lines
589 B
Bash
Executable file
19 lines
589 B
Bash
Executable file
#!/bin/bash -e
|
|
|
|
install -v -d "${ROOTFS_DIR}/etc/systemd/system/dhcpcd.service.d"
|
|
install -v -m 644 files/wait.conf "${ROOTFS_DIR}/etc/systemd/system/dhcpcd.service.d/"
|
|
|
|
install -v -d "${ROOTFS_DIR}/etc/wpa_supplicant"
|
|
install -v -m 600 files/wpa_supplicant.conf "${ROOTFS_DIR}/etc/wpa_supplicant/"
|
|
|
|
if [ -v WPA_COUNTRY ]
|
|
then
|
|
echo "country=${WPA_COUNTRY}" >> "${ROOTFS_DIR}/etc/wpa_supplicant/wpa_supplicant.conf"
|
|
fi
|
|
|
|
if [ -v WPA_ESSID -a -v WPA_PASSWORD ]
|
|
then
|
|
on_chroot <<EOF
|
|
wpa_passphrase "${WPA_ESSID}" "${WPA_PASSWORD}" >> "/etc/wpa_supplicant/wpa_supplicant.conf"
|
|
EOF
|
|
fi
|