XenAPI: add support to use local.conf
XenServer install with devstack doesn't support local.conf, this fix
is to add support for using local.conf and backward-compatibility of
localrc
Change-Id: Ie494e01f8f1ecb8720e14392ef3f12d5a5a01dcd
Closes-Bug: #1528520
diff --git a/stack.sh b/stack.sh
index 09ab474..df893da 100755
--- a/stack.sh
+++ b/stack.sh
@@ -149,19 +149,7 @@
# Phase: local
rm -f $TOP_DIR/.localrc.auto
-if [[ -r $TOP_DIR/local.conf ]]; then
- LRC=$(get_meta_section_files $TOP_DIR/local.conf local)
- for lfile in $LRC; do
- if [[ "$lfile" == "localrc" ]]; then
- if [[ -r $TOP_DIR/localrc ]]; then
- warn $LINENO "localrc and local.conf:[[local]] both exist, using localrc"
- else
- echo "# Generated file, do not edit" >$TOP_DIR/.localrc.auto
- get_meta_section $TOP_DIR/local.conf local $lfile >>$TOP_DIR/.localrc.auto
- fi
- fi
- done
-fi
+extract_localrc_section $TOP_DIR/local.conf $TOP_DIR/localrc $TOP_DIR/.localrc.auto
# ``stack.sh`` is customizable by setting environment variables. Override a
# default setting via export::