From b08b673def8f5c80b7a91ba2127edbb13c39c26a Mon Sep 17 00:00:00 2001 From: Pavlo Shchelokovskyy Date: Sun, 14 Aug 2016 13:26:13 +0300 Subject: [PATCH] Allow properly overriding DEST Change the order of variable declarations in stackrc so that setting custom DEST in local.conf is also affecting DATA_DIR, SERVICE_DIR and SUBUNIT_OUTPUT. Change-Id: I00847bb6733febf105855ae6fc577a7c904ec4b4 Closes-Bug: #1285720 --- stackrc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/stackrc b/stackrc index 4fefe8da30..9513e5a714 100644 --- a/stackrc +++ b/stackrc @@ -23,15 +23,6 @@ source $RC_DIR/functions # Destination path for installation DEST=/opt/stack -# Destination for working data -DATA_DIR=${DEST}/data - -# Destination for status files -SERVICE_DIR=${DEST}/status - -# Path for subunit output file -SUBUNIT_OUTPUT=${DEST}/devstack.subunit - # Determine stack user if [[ $EUID -eq 0 ]]; then STACK_USER=stack @@ -137,6 +128,15 @@ elif [[ -f $RC_DIR/.localrc.auto ]]; then source $RC_DIR/.localrc.auto fi +# Destination for working data +DATA_DIR=${DATA_DIR:-$DEST/data} + +# Destination for status files +SERVICE_DIR=${SERVICE_DIR:-$DEST/status} + +# Path for subunit output file +SUBUNIT_OUTPUT=${SUBUNIT_OUTPUT:-$DEST/devstack.subunit} + # Default for log coloring is based on interactive-or-not. # Baseline assumption is that non-interactive invocations are for CI, # where logs are to be presented as browsable text files; hence color