summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2014-02-25 16:37:39 +0000
committerPedro Alvarez <pedro.alvarez@codethink.co.uk>2014-02-26 15:13:12 +0000
commit6fbc06831bea474573dff2236fb46b96b0ddf390 (patch)
tree141e879ecdc95c900a15eb76a384182a8dd3e4ee
parentcdece44ea08a8b1abc3b481cce31cffb40ca2628 (diff)
downloadmorphs-6fbc06831bea474573dff2236fb46b96b0ddf390.tar.gz
fixup! trove.configure: Don't run on upgrades
-rwxr-xr-xtrove.configure10
1 files changed, 7 insertions, 3 deletions
diff --git a/trove.configure b/trove.configure
index ce04a22..03b677a 100755
--- a/trove.configure
+++ b/trove.configure
@@ -41,7 +41,14 @@ 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
@@ -68,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