diff --git a/tools/xen/build_xva.sh b/tools/xen/build_xva.sh index cc3cbe18d1..7c8e620f44 100755 --- a/tools/xen/build_xva.sh +++ b/tools/xen/build_xva.sh @@ -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 diff --git a/tools/xen/install_os_domU.sh b/tools/xen/install_os_domU.sh index ff7e6fbc88..3a63473d40 100755 --- a/tools/xen/install_os_domU.sh +++ b/tools/xen/install_os_domU.sh @@ -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 # diff --git a/tools/xen/prepare_guest_template.sh b/tools/xen/prepare_guest_template.sh index 2d3b89821f..a7a60ca5e6 100755 --- a/tools/xen/prepare_guest_template.sh +++ b/tools/xen/prepare_guest_template.sh @@ -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 diff --git a/tools/xen/scripts/install_ubuntu_template.sh b/tools/xen/scripts/install_ubuntu_template.sh index d4d6567a40..d80ed095e8 100755 --- a/tools/xen/scripts/install_ubuntu_template.sh +++ b/tools/xen/scripts/install_ubuntu_template.sh @@ -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 diff --git a/tools/xen/xenrc b/tools/xen/xenrc index 510c5f9c46..0cbf86118d 100644 --- a/tools/xen/xenrc +++ b/tools/xen/xenrc @@ -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