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:
parent
dec5ca0f20
commit
518fb760d3
@ -21,19 +21,12 @@ set -o xtrace
|
|||||||
# This directory
|
# This directory
|
||||||
TOP_DIR=$(cd $(dirname "$0") && pwd)
|
TOP_DIR=$(cd $(dirname "$0") && pwd)
|
||||||
|
|
||||||
# Source lower level functions
|
|
||||||
. $TOP_DIR/../../functions
|
|
||||||
|
|
||||||
# Include onexit commands
|
# Include onexit commands
|
||||||
. $TOP_DIR/scripts/on_exit.sh
|
. $TOP_DIR/scripts/on_exit.sh
|
||||||
|
|
||||||
# xapi functions
|
# xapi functions
|
||||||
. $TOP_DIR/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 params - override xenrc params in your localrc to suite your taste
|
||||||
source xenrc
|
source xenrc
|
||||||
|
|
||||||
|
@ -22,19 +22,12 @@ fi
|
|||||||
# This directory
|
# This directory
|
||||||
THIS_DIR=$(cd $(dirname "$0") && pwd)
|
THIS_DIR=$(cd $(dirname "$0") && pwd)
|
||||||
|
|
||||||
# Source lower level functions
|
|
||||||
. $THIS_DIR/../../functions
|
|
||||||
|
|
||||||
# Include onexit commands
|
# Include onexit commands
|
||||||
. $THIS_DIR/scripts/on_exit.sh
|
. $THIS_DIR/scripts/on_exit.sh
|
||||||
|
|
||||||
# xapi functions
|
# xapi functions
|
||||||
. $THIS_DIR/functions
|
. $THIS_DIR/functions
|
||||||
|
|
||||||
# Determine what system we are running on.
|
|
||||||
# Might not be XenServer if we're using xenserver-core
|
|
||||||
GetDistro
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Get Settings
|
# Get Settings
|
||||||
#
|
#
|
||||||
|
@ -22,19 +22,12 @@ set -o xtrace
|
|||||||
# This directory
|
# This directory
|
||||||
TOP_DIR=$(cd $(dirname "$0") && pwd)
|
TOP_DIR=$(cd $(dirname "$0") && pwd)
|
||||||
|
|
||||||
# Source lower level functions
|
|
||||||
. $TOP_DIR/../../functions
|
|
||||||
|
|
||||||
# Include onexit commands
|
# Include onexit commands
|
||||||
. $TOP_DIR/scripts/on_exit.sh
|
. $TOP_DIR/scripts/on_exit.sh
|
||||||
|
|
||||||
# xapi functions
|
# xapi functions
|
||||||
. $TOP_DIR/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 params - override xenrc params in your localrc to suite your taste
|
||||||
source xenrc
|
source xenrc
|
||||||
|
|
||||||
|
@ -14,9 +14,6 @@ set -o xtrace
|
|||||||
# This directory
|
# This directory
|
||||||
BASE_DIR=$(cd $(dirname "$0") && pwd)
|
BASE_DIR=$(cd $(dirname "$0") && pwd)
|
||||||
|
|
||||||
# Source the top level functions
|
|
||||||
source $BASE_DIR/../../../functions
|
|
||||||
|
|
||||||
# For default setings see xenrc
|
# For default setings see xenrc
|
||||||
source $BASE_DIR/../xenrc
|
source $BASE_DIR/../xenrc
|
||||||
|
|
||||||
|
@ -91,7 +91,24 @@ UBUNTU_INST_GATEWAY=""
|
|||||||
# Set the size to 0 to avoid creation of additional disk.
|
# Set the size to 0 to avoid creation of additional disk.
|
||||||
XEN_XVDB_SIZE_GB=0
|
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
|
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
|
$restore_nounset
|
||||||
|
Loading…
x
Reference in New Issue
Block a user