2016-04-11 02:29:41 -04:00
|
|
|
#!/bin/bash -e
|
|
|
|
|
2018-03-02 15:08:24 -05:00
|
|
|
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/"
|
2016-04-11 02:29:41 -04:00
|
|
|
|
2018-03-02 15:08:24 -05:00
|
|
|
install -v -d "${ROOTFS_DIR}/etc/wpa_supplicant"
|
|
|
|
install -v -m 600 files/wpa_supplicant.conf "${ROOTFS_DIR}/etc/wpa_supplicant/"
|
2016-04-11 02:29:41 -04:00
|
|
|
|
2019-02-18 07:54:15 -05:00
|
|
|
if [ -v WPA_COUNTRY ]; then
|
2018-12-16 19:01:04 -05:00
|
|
|
echo "country=${WPA_COUNTRY}" >> "${ROOTFS_DIR}/etc/wpa_supplicant/wpa_supplicant.conf"
|
|
|
|
fi
|
|
|
|
|
2019-02-18 07:54:15 -05:00
|
|
|
if [ -v WPA_ESSID ] && [ -v WPA_PASSWORD ]; then
|
2018-12-16 19:01:04 -05:00
|
|
|
on_chroot <<EOF
|
2019-01-05 15:34:47 -05:00
|
|
|
wpa_passphrase "${WPA_ESSID}" "${WPA_PASSWORD}" >> "/etc/wpa_supplicant/wpa_supplicant.conf"
|
2018-12-16 19:01:04 -05:00
|
|
|
EOF
|
|
|
|
fi
|