Merge branch 'master' of github.com:madeden/pi-gen
This commit is contained in:
commit
c53c02f8c9
|
@ -119,11 +119,11 @@ The following environment variables are supported:
|
|||
|
||||
* `WPA_ESSID`, `WPA_PASSWORD` and `WPA_COUNTRY` (Default: unset)
|
||||
|
||||
If these are set, they are use to configure `wpa_supplicant.conf`, so that the raspberry pi can automatically connect to a wifi network on first boot. If `WPA_ESSID` is set and `WPA_PASSWORD` is unset an unprotected wifi network will be configured.
|
||||
If these are set, they are use to configure `wpa_supplicant.conf`, so that the Raspberry Pi can automatically connect to a wifi network on first boot. If `WPA_ESSID` is set and `WPA_PASSWORD` is unset an unprotected wifi network will be configured. If set, `WPA_PASSWORD` must be between 8 and 63 characters.
|
||||
|
||||
* `ENABLE_SSH` (Default: `0`)
|
||||
|
||||
Setting to `1` will enable ssh server for remote log in. Note that if you are using a common password such as the defaults there is a high risk of attackers taking over you RaspberryPi.
|
||||
Setting to `1` will enable ssh server for remote log in. Note that if you are using a common password such as the defaults there is a high risk of attackers taking over you Raspberry Pi.
|
||||
|
||||
* `STAGE_LIST` (Default: `stage*`)
|
||||
|
||||
|
|
5
build.sh
5
build.sh
|
@ -220,6 +220,11 @@ if [[ -n "${APT_PROXY}" ]] && ! curl --silent "${APT_PROXY}" >/dev/null ; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -n "${WPA_PASSWORD}" && ${#WPA_PASSWORD} -lt 8 || ${#WPA_PASSWORD} -gt 63 ]] ; then
|
||||
echo "WPA_PASSWORD" must be between 8 and 63 characters
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir -p "${WORK_DIR}"
|
||||
log "Begin ${BASE_DIR}"
|
||||
|
||||
|
|
|
@ -12,7 +12,8 @@ fi
|
|||
|
||||
if [ -v WPA_ESSID ] && [ -v WPA_PASSWORD ]; then
|
||||
on_chroot <<EOF
|
||||
wpa_passphrase "${WPA_ESSID}" "${WPA_PASSWORD}" >> "/etc/wpa_supplicant/wpa_supplicant.conf"
|
||||
set -o pipefail
|
||||
wpa_passphrase "${WPA_ESSID}" "${WPA_PASSWORD}" | tee -a "/etc/wpa_supplicant/wpa_supplicant.conf"
|
||||
EOF
|
||||
elif [ -v WPA_ESSID ]; then
|
||||
cat >> "${ROOTFS_DIR}/etc/wpa_supplicant/wpa_supplicant.conf" << EOL
|
||||
|
|
Loading…
Reference in New Issue
Block a user