564f8ef1b8
* Made more specific shellcheck disables * Fixed variable quoting (SC2086,SC2064) * Use `$*` expansion instead of `$@` when not using arrays (SC2124) * Use cleaner `$()` syntax instead of back quotes (SC2006) * Improved comparator (SC2166) * Minor improvements in coding style Tested clean output using: `find -name "*.sh" | xargs -n1 shellcheck -x`.
18 lines
595 B
Bash
Executable File
18 lines
595 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 ] && [ -v WPA_PASSWORD ]; then
|
|
on_chroot <<EOF
|
|
wpa_passphrase "${WPA_ESSID}" "${WPA_PASSWORD}" >> "/etc/wpa_supplicant/wpa_supplicant.conf"
|
|
EOF
|
|
fi
|