Warn early if proxy not reachable

Avoids a later failure with a less informative message. See #248
pull/262/head
Sam Tygier 2019-02-18 22:09:33 +00:00
parent 564f8ef1b8
commit bd8f7c54ee
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}"