Warn early if proxy not reachable (#262)

Avoids a later failure with a less informative message. See #248
pull/278/head
samtygier 2019-02-18 23:41:41 +00:00 committed by XECDesign
parent 564f8ef1b8
commit b7812278a8
1 changed files with 5 additions and 0 deletions

View File

@ -203,6 +203,11 @@ if [[ ! "$FIRST_USER_NAME" =~ ^[a-z][-a-z0-9_]*$ ]]; then
exit 1
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"
mkdir -p "${WORK_DIR}"