Merge "Use sed without -i option for portability"

This commit is contained in:
Jenkins 2015-10-16 12:12:41 +00:00 committed by Gerrit Code Review
commit 42eaced6c9

View File

@ -455,7 +455,10 @@ setup_rally_configuration () {
cp "$SRCDIR"/etc/rally/rally.conf.sample "$ETCDIR"/rally.conf
[ -d "$DBDIR" ] || mkdir -p "$DBDIR"
sed -i "s|#connection *=.*|connection = \"$DBCONNSTRING\"|" "$ETCDIR"/rally.conf
local CONF_TMPFILE=$(mktemp)
sed "s|#connection *=.*|connection = \"$DBCONNSTRING\"|" "$ETCDIR"/rally.conf > "$CONF_TMPFILE"
cat "$CONF_TMPFILE" > "$ETCDIR"/rally.conf
rm "$CONF_TMPFILE"
rally-manage db recreate
}