From 8bd00564430539570dba425a9e6cf5f5ac5b18b5 Mon Sep 17 00:00:00 2001 From: K Jonathan Harker Date: Wed, 2 Jul 2014 16:45:56 -0700 Subject: [PATCH] Export prepare_node variables rather than pass them around The prepare_node scripts are primarily called from within nodepool, which only passes in a single argument: the hostname of the node. The rest of the values that we want to pass in to the underlying prepare_node script can be shared through the environment, making order no longer important and alleviating the need to duplicate setting defaults in order to pad positional arguments to a newly created variable. Change-Id: I0a13e27524b75a50a482870414ebe2fd6ac8315e --- .../files/nodepool/scripts/prepare_node.sh | 13 +++++++------ .../files/nodepool/scripts/prepare_node_bare.sh | 13 +++++++------ .../files/nodepool/scripts/prepare_node_devstack.sh | 9 +++++---- .../scripts/prepare_node_devstack_new_kernel.sh | 9 +++++---- .../files/nodepool/scripts/prepare_node_py3k.sh | 13 +++++++------ .../files/nodepool/scripts/prepare_node_tripleo.sh | 9 +++++---- 6 files changed, 36 insertions(+), 30 deletions(-) diff --git a/modules/openstack_project/files/nodepool/scripts/prepare_node.sh b/modules/openstack_project/files/nodepool/scripts/prepare_node.sh index 1eb4536618..32d1488b55 100755 --- a/modules/openstack_project/files/nodepool/scripts/prepare_node.sh +++ b/modules/openstack_project/files/nodepool/scripts/prepare_node.sh @@ -17,12 +17,13 @@ # limitations under the License. HOSTNAME=$1 -SUDO=$2 -THIN=$3 -PYTHON3=${4:-false} -PYPY=${5:-false} -ALL_MYSQL_PRIVS=${6:-false} -GIT_BASE=${7:-git://git.openstack.org} + +SUDO=${SUDO:-true} +THIN=${THIN:-true} +PYTHON3=${PYTHON3:-false} +PYPY=${PYPY:-false} +ALL_MYSQL_PRIVS=${ALL_MYSQL_PRIVS:-false} +GIT_BASE=${GIT_BASE:-git://git.openstack.org} # Save the nameservers configured by our provider. cat >/tmp/forwarding.conf <