XenAPI: workaround for unsupp. associative arrays

Dom0's bash does not support associative arrays, however we source
`functions` and therefore our scripts fail. This change breaks the
dependency of dom0 tools on domU functions.

Fixes bug: 1379804

Change-Id: I229e2d5f07070a9236ec612d4032c94c4361a9f6
This commit is contained in:
Mate Lakat 2014-10-17 13:14:49 +02:00
parent dec5ca0f20
commit 518fb760d3
5 changed files with 19 additions and 26 deletions

View File

@ -21,19 +21,12 @@ set -o xtrace
# This directory
TOP_DIR=$(cd $(dirname "$0") && pwd)
# Source lower level functions
. $TOP_DIR/../../functions
# Include onexit commands
. $TOP_DIR/scripts/on_exit.sh
# xapi functions
. $TOP_DIR/functions
# Determine what system we are running on.
# Might not be XenServer if we're using xenserver-core
GetDistro
# Source params - override xenrc params in your localrc to suite your taste
source xenrc

View File

@ -22,19 +22,12 @@ fi
# This directory
THIS_DIR=$(cd $(dirname "$0") && pwd)
# Source lower level functions
. $THIS_DIR/../../functions
# Include onexit commands
. $THIS_DIR/scripts/on_exit.sh
# xapi functions
. $THIS_DIR/functions
# Determine what system we are running on.
# Might not be XenServer if we're using xenserver-core
GetDistro
#
# Get Settings
#

View File

@ -22,19 +22,12 @@ set -o xtrace
# This directory
TOP_DIR=$(cd $(dirname "$0") && pwd)
# Source lower level functions
. $TOP_DIR/../../functions
# Include onexit commands
. $TOP_DIR/scripts/on_exit.sh
# xapi functions
. $TOP_DIR/functions
# Determine what system we are running on.
# Might not be XenServer if we're using xenserver-core
GetDistro
# Source params - override xenrc params in your localrc to suite your taste
source xenrc

View File

@ -14,9 +14,6 @@ set -o xtrace
# This directory
BASE_DIR=$(cd $(dirname "$0") && pwd)
# Source the top level functions
source $BASE_DIR/../../../functions
# For default setings see xenrc
source $BASE_DIR/../xenrc

View File

@ -91,7 +91,24 @@ UBUNTU_INST_GATEWAY=""
# Set the size to 0 to avoid creation of additional disk.
XEN_XVDB_SIZE_GB=0
restore_nounset=`set +o | grep nounset`
STACK_USER=stack
DOMZERO_USER=domzero
RC_DIR="../.."
restore_nounset=$(set +o | grep nounset)
set +u
source ../../stackrc
## Note that the lines below are coming from stackrc to support
## new-style config files
# allow local overrides of env variables, including repo config
if [[ -f $RC_DIR/localrc ]]; then
# Old-style user-supplied config
source $RC_DIR/localrc
elif [[ -f $RC_DIR/.localrc.auto ]]; then
# New-style user-supplied config extracted from local.conf
source $RC_DIR/.localrc.auto
fi
$restore_nounset