Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix small bug where SHORT_HOST depends on FULL_HOSTNAME but is called…

… before it exists
  • Loading branch information...
commit 65e0cfb94663ec3c7e5d8e236a4dbf7ce8b91c86 1 parent e13f25d
Tom Ellis authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  bootstrap/puppet/centos/centos6_puppetmaster_apache.sh
View
2  bootstrap/puppet/centos/centos6_puppetmaster_apache.sh
@@ -43,7 +43,6 @@
MYSQL_PASSWD="t3mp0rary"
PUPPET_MYSQL_PASSWD="t3mppupp3t"
-SHORT_HOST=`echo ${FULL_HOSTNAME} | cut -d'.' -f1`
YUM=`which yum`
RPM=`which rpm`
CURL=`which curl`
@@ -61,6 +60,7 @@ MODULE_PATH="/root/puppet/modules"
# is to pull it directly from the metadata service.
###########
FULL_HOSTNAME=`${CURL} http://169.254.169.254/latest/meta-data/public-hostname`
+SHORT_HOST=`echo ${FULL_HOSTNAME} | cut -d'.' -f1`
hostname ${FULL_HOSTNAME}
sed -i -e "s/\(localhost.localdomain\)/${SHORT_HOST} ${FULL_HOSTNAME} \1/" /etc/hosts
Please sign in to comment.
Something went wrong with that request. Please try again.