Add meta-config via local.conf
This defines a new local.conf file that is designed to take the place of all
of the 'pass-through'[1] configuration options that have been defined in DevStack.
* new local.conf file can contain multiple config file settings to be
merged in to existing project config files
* localrc can be embedded into local.conf and will auto-extract if
localrc does not exist
* Adds functions get_meta_section(), get_meta_section_files(),
merge_config_file() and merge_config_group()
* Adds EXTRA_OPTS, EXTRA_BAREMETAL_OPTS, Q_DHCP_EXTRA_DEFAULT_OPTS and
Q_SRV_EXTRA_DEFAULT_OPTS to the deprecated warning list at the end of stack.sh
[1] Pass-through options are those that do not configure or change DevStack's behaviour
but simply set a value in a project config file. This includes most of the EXTRA_XXX_OPTS
configuration variables.
Change-Id: I367cadc86116621e9574ac203aafdab483d810d3
diff --git a/functions b/functions
index f996ba8..87586eb 100644
--- a/functions
+++ b/functions
@@ -155,6 +155,22 @@
}
+# Prints line number and "message" in warning format
+# warn $LINENO "message"
+function warn() {
+ local exitcode=$?
+ errXTRACE=$(set +o | grep xtrace)
+ set +o xtrace
+ local msg="[WARNING] ${BASH_SOURCE[2]}:$1 $2"
+ echo $msg 1>&2;
+ if [[ -n ${SCREEN_LOGDIR} ]]; then
+ echo $msg >> "${SCREEN_LOGDIR}/error.log"
+ fi
+ $errXTRACE
+ return $exitcode
+}
+
+
# HTTP and HTTPS proxy servers are supported via the usual environment variables [1]
# ``http_proxy``, ``https_proxy`` and ``no_proxy``. They can be set in
# ``localrc`` or on the command line if necessary::