summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorSam Tygier <samtygier@yahoo.co.uk>2019-12-23 14:29:09 +0000
committerXECDesign <XECDesign@users.noreply.github.com>2020-01-07 08:07:48 +0000
commit024840034e2fab7efe170a303ef726fed1314f82 (patch)
treea7c2f154821ed0a93f0fd146ba392c445320b394 /build.sh
parent271177a0f781a116ddaeb485ac62d28bc18fe74c (diff)
Check WPA_PASSWORD length early
WPA_PASSWORD needs to be between 8 adn 63 characters. Check early to avoid hitting error in stage2.
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh5
1 files changed, 5 insertions, 0 deletions
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}"