Allow setting up wifi from config
Add WPA_ESSID, WPA_PASSWORD and WPA_COUNTRY options to config.
This commit is contained in:
committed by
Peter Johnson
parent
bc7971ef03
commit
acb0612ea4
@@ -16,3 +16,14 @@ chown root:root /boot/dhcpcd.conf
|
||||
ln -s /boot/dhcpcd.conf /etc/dhcpcd.conf
|
||||
EOF
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user