Check WPA_PASSWORD length early

WPA_PASSWORD needs to be between 8 adn 63 characters. Check early
to avoid hitting error in stage2.
This commit is contained in:
Sam Tygier 2019-12-23 14:29:09 +00:00 committed by XECDesign
parent 271177a0f7
commit 024840034e

View file

@ -220,6 +220,11 @@ if [[ -n "${APT_PROXY}" ]] && ! curl --silent "${APT_PROXY}" >/dev/null ; then
exit 1 exit 1
fi fi
if [[ ${#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}" mkdir -p "${WORK_DIR}"
log "Begin ${BASE_DIR}" log "Begin ${BASE_DIR}"