summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2014-03-06 13:33:37 (GMT)
committerSam Thursfield <sam.thursfield@codethink.co.uk>2014-03-06 13:33:37 (GMT)
commit49f78fa0c1b99beb018939dd88560fe1ecb9d63f (patch)
tree2e4361c36878bfe7d7dbbe1bd719f74d490abfac
parent70235e2d4eeead5d86d83eb358186a871371ac7a (diff)
downloaddefinitions-49f78fa0c1b99beb018939dd88560fe1ecb9d63f.tar.gz
trove: Allow multiple configuration placeholders on one line
The generated /etc/trove-setup.sed script, used to set up site configuration for a deployed Trove on first-boot by trove-early-setup, did not specify the 'g' (global) flag which meant that lines with more than one occurance of a placeholder such as ##TROVE_HOST## were not set correctly.
-rwxr-xr-xtrove.configure18
1 files changed, 9 insertions, 9 deletions
diff --git a/trove.configure b/trove.configure
index 38a5d61..17686eb 100755
--- a/trove.configure
+++ b/trove.configure
@@ -61,16 +61,16 @@ lua_escape()
echo "Create /etc/trove-setup.sed for trove-early-setup"
cat <<EOF > "$ROOT/etc/trove-setup.sed"
-s/##TROVE_HOSTNAME##/$TROVE_ID/
-s/##MASON_HOST##/$MASON_ID/
-s/##MASON_PORT##/18755/
-s/##TROVE_TITLE##/$TROVE_ID/
-s/##TROVE_COMPANY##/$TROVE_COMPANY/
-s/##TROVE_LOG_PREFIX##/$TROVE_ID/
-s/##ESC_PERSONAL_PREFIX##/people/
-s/##PREFIX##/$TROVE_ID/
+s/##TROVE_HOSTNAME##/$TROVE_ID/g
+s/##MASON_HOST##/$MASON_ID/g
+s/##MASON_PORT##/18755/g
+s/##TROVE_TITLE##/$TROVE_ID/g
+s/##TROVE_COMPANY##/$TROVE_COMPANY/g
+s/##TROVE_LOG_PREFIX##/$TROVE_ID/g
+s/##ESC_PERSONAL_PREFIX##/people/g
+s/##PREFIX##/$TROVE_ID/g
## The same prefix as above, only lua-pattern-escaped
-s/##ESC_PREFIX##/$(lua_escape "$TROVE_ID")/
+s/##ESC_PREFIX##/$(lua_escape "$TROVE_ID")/g
EOF
##########################################################################