From 024840034e2fab7efe170a303ef726fed1314f82 Mon Sep 17 00:00:00 2001 From: Sam Tygier Date: Mon, 23 Dec 2019 14:29:09 +0000 Subject: [PATCH] Check WPA_PASSWORD length early WPA_PASSWORD needs to be between 8 adn 63 characters. Check early to avoid hitting error in stage2. --- build.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build.sh b/build.sh index a396b06..4ef6296 100755 --- a/build.sh +++ b/build.sh @@ -220,6 +220,11 @@ if [[ -n "${APT_PROXY}" ]] && ! curl --silent "${APT_PROXY}" >/dev/null ; then exit 1 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}" log "Begin ${BASE_DIR}"