From 3fb2ed64625e2a1ed18b8ef23d69e4fcd066e72f Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sat, 17 Oct 2015 16:39:43 -0400 Subject: [PATCH] Ensure the user has a valid hostname set If the hostname is not set, the debian package install will fail, causing further downstream issues --- bootstrap.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bootstrap.sh b/bootstrap.sh index 903413d21..96755627b 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -24,6 +24,11 @@ if ! command -v apt-get &>/dev/null; then exit 1 fi +hostname -f > /dev/null 2>&1 || { + echo "This installation script requires that you have a hostname set for the instance. Please set a hostname for 127.0.0.1 in your /etc/hosts" + exit 1 +} + apt-get update -qq > /dev/null which curl > /dev/null || apt-get install -qq -y curl [[ $(lsb_release -sr) == "12.04" ]] && apt-get install -qq -y python-software-properties