mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-05 05:04:46 +02:00

It's easy to get the proxy settings wrong and not realise until you've got quite a long way into the process of setting things up. Thus, add a check where we actually try to fetch various things within the container environment and fail reasonably early if things aren't working. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
36 lines
675 B
Bash
Executable File
36 lines
675 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Run a few connectivity checks
|
|
echo "Checking external connectivity..."
|
|
|
|
CCTEMP=`mktemp -d`
|
|
cd $CCTEMP || exit 1
|
|
|
|
cleanup_tmp() {
|
|
cd /tmp
|
|
rm -rf $CCTEMP
|
|
}
|
|
|
|
HTTP_TEST_URL="http://example.com"
|
|
if ! wget -q $HTTP_TEST_URL ; then
|
|
echo "ERROR: failed to fetch $HTTP_TEST_URL"
|
|
cleanup_tmp
|
|
exit 1
|
|
fi
|
|
|
|
HTTPS_TEST_URL="https://google.com"
|
|
if ! wget -q $HTTPS_TEST_URL ; then
|
|
echo "ERROR: failed to fetch $HTTPS_TEST_URL"
|
|
cleanup_tmp
|
|
exit 1
|
|
fi
|
|
|
|
GIT_TEST_REPO="git://git.yoctoproject.org/meta-layerindex-test"
|
|
if ! git clone -q $GIT_TEST_REPO ; then
|
|
echo "ERROR: failed to clone $GIT_TEST_REPO"
|
|
cleanup_tmp
|
|
exit 1
|
|
fi
|
|
|
|
cleanup_tmp
|