Warn early if proxy not reachable (#262)

Avoids a later failure with a less informative message. See #248
This commit is contained in:
samtygier 2019-02-18 23:41:41 +00:00 committed by XECDesign
parent 564f8ef1b8
commit b7812278a8

View File

@ -203,6 +203,11 @@ if [[ ! "$FIRST_USER_NAME" =~ ^[a-z][-a-z0-9_]*$ ]]; then
exit 1 exit 1
fi fi
if [[ -n "${APT_PROXY}" ]] && ! curl --silent ${APT_PROXY} >/dev/null ; then
echo "Could not reach APT_PROXY server:" ${APT_PROXY}
exit 1
fi
dependencies_check "${BASE_DIR}/depends" dependencies_check "${BASE_DIR}/depends"
mkdir -p "${WORK_DIR}" mkdir -p "${WORK_DIR}"