summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2014-03-03 13:44:04 (GMT)
committerSam Thursfield <sam.thursfield@codethink.co.uk>2014-03-03 13:44:04 (GMT)
commitf72112e801eb6c44fba746d2c2eebe6388f85684 (patch)
tree7d10914cacdda53402ee2a06a3bce762e0402d1f
parentb99e9f40c9b40d1150be2e635783be2bf4060005 (diff)
downloaddefinitions-f72112e801eb6c44fba746d2c2eebe6388f85684.tar.gz
trove: Avoid running trove-early-setup on upgrades
The trove-early-setup configuration tool is for initial deployment only.
-rwxr-xr-xtrove.configure14
1 files changed, 11 insertions, 3 deletions
diff --git a/trove.configure b/trove.configure
index b2f21ff..1e6f6f5 100755
--- a/trove.configure
+++ b/trove.configure
@@ -41,6 +41,17 @@ set -e
ROOT="$1"
+# The generic system that we are configuring contains a default hostname
+# which we should override. This is necessary even when upgrading because
+# baserock-system-config-sync isn't smart enough to deal.
+echo "Set hostname to $TROVE_ID"
+echo "$TROVE_ID" > "$ROOT/etc/hostname"
+
+if [ "$UPGRADE" == "yes" ]; then
+ echo "Not configuring trove-early-setup because this is an upgrade."
+ exit 0
+fi
+
##########################################################################
lua_escape()
@@ -64,9 +75,6 @@ EOF
##########################################################################
-echo "Set hostname to $TROVE_ID"
-echo "$TROVE_ID" > "$ROOT/etc/hostname"
-
# trove-early-setup needs "localhost" to be defined, and there's no
# guarantee it's going to be in DNS, or that external networking is
# up when trove-early-setup runs. We work around this by creating