summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alvarez <pedro.alvarez@codethink.co.uk>2014-11-18 12:29:09 (GMT)
committerPedro Alvarez <pedro.alvarez@codethink.co.uk>2014-11-19 17:24:19 (GMT)
commitf3352d2907355b03ba9946abc9007e7259cb3689 (patch)
treee13fcb060ad636ad9626835dc9835d643d6be923
parent0f90d4a8219199f6941da600f173f96b06bc5a52 (diff)
downloaddefinitions-f3352d2907355b03ba9946abc9007e7259cb3689.tar.gz
Check Mason variables after installing Mason files
This way, if the Mason system that is being deployed is generic, it will contain the files needed to setup and run Mason.
-rw-r--r--mason.configure58
1 files changed, 28 insertions, 30 deletions
diff --git a/mason.configure b/mason.configure
index 621d6a3..ec8bf7d 100644
--- a/mason.configure
+++ b/mason.configure
@@ -32,36 +32,6 @@
set -e
-
-##########################################################################
-# Check variables
-##########################################################################
-
-if [ -n "$MASON_GENERIC" ]; then
- echo Not configuring Mason, it will be generic
- exit 0
-fi
-
-if [ -z "$MASON_CLUSTER_MORPHOLOGY" -a \
- -z "$MASON_DEFINITIONS_REF" -a \
- -z "$MASON_DISTBUILD_ARCH" -a \
- -z "$MASON_TEST_HOST" ]; then
- # No Mason options defined, do nothing.
- exit 0
-fi
-
-if [ -z "$ARTIFACT_CACHE_SERVER" -o \
- -z "$CONTROLLERHOST" -o \
- -z "$MASON_CLUSTER_MORPHOLOGY" -o \
- -z "$MASON_DEFINITIONS_REF" -o \
- -z "$MASON_DISTBUILD_ARCH" -o \
- -z "$MASON_TEST_HOST" -o \
- -z "$TROVE_HOST" -o \
- -z "$TROVE_ID" ]; then
- echo Some options required for Mason were defined, but not all.
- exit 1
-fi
-
##########################################################################
# Copy Mason files into root filesystem
##########################################################################
@@ -104,6 +74,34 @@ cp mason/mason-setup.service "$ROOT"/etc/systemd/system/mason-setup.service
ln -s ../mason-setup.service "$ROOT"/etc/systemd/system/multi-user.target.wants/mason-setup.service
+##########################################################################
+# Check variables
+##########################################################################
+
+if [ -n "$MASON_GENERIC" ]; then
+ echo Not configuring Mason, it will be generic
+ exit 0
+fi
+
+if [ -z "$MASON_CLUSTER_MORPHOLOGY" -a \
+ -z "$MASON_DEFINITIONS_REF" -a \
+ -z "$MASON_DISTBUILD_ARCH" -a \
+ -z "$MASON_TEST_HOST" ]; then
+ # No Mason options defined, do nothing.
+ exit 0
+fi
+
+if [ -z "$ARTIFACT_CACHE_SERVER" -o \
+ -z "$CONTROLLERHOST" -o \
+ -z "$MASON_CLUSTER_MORPHOLOGY" -o \
+ -z "$MASON_DEFINITIONS_REF" -o \
+ -z "$MASON_DISTBUILD_ARCH" -o \
+ -z "$MASON_TEST_HOST" -o \
+ -z "$TROVE_HOST" -o \
+ -z "$TROVE_ID" ]; then
+ echo Some options required for Mason were defined, but not all.
+ exit 1
+fi
##########################################################################
# Generate config variable shell snippet