From af4f2c5a8cd504681acdf4a1af69df7ae11a1259 Mon Sep 17 00:00:00 2001 From: d34dh0r53 Date: Mon, 23 Feb 2015 15:20:16 -0600 Subject: [PATCH] Replaces the default PUBLIC_INTERFACE of eth0 This patch adds some logic that determines what the primary interface is based on the default route and uses that as the default rather than eth0. Closes-Bug: 1424828 Change-Id: I4e1cebec60275c57768a0ef4281035c21f69dbbf --- scripts/bootstrap-aio.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/bootstrap-aio.sh b/scripts/bootstrap-aio.sh index e5e76b3545..9ee546bb74 100755 --- a/scripts/bootstrap-aio.sh +++ b/scripts/bootstrap-aio.sh @@ -23,7 +23,7 @@ export ADMIN_PASSWORD=${ADMIN_PASSWORD:-"secrete"} export SERVICE_REGION=${SERVICE_REGION:-"RegionOne"} export DEPLOY_SWIFT=${DEPLOY_SWIFT:-"yes"} export GET_PIP_URL=${GET_PIP_URL:-"https://bootstrap.pypa.io/get-pip.py"} -export PUBLIC_INTERFACE=${PUBLIC_INTERFACE:-"eth0"} +export PUBLIC_INTERFACE=${PUBLIC_INTERFACE:-$(ip route show | awk '/default/ { print $NF }')} export PUBLIC_ADDRESS=${PUBLIC_ADDRESS:-$(ip -o -4 addr show dev ${PUBLIC_INTERFACE} | awk -F '[ /]+' '/global/ {print $4}')} export NOVA_VIRT_TYPE=${NOVA_VIRT_TYPE:-"qemu"} export TEMPEST_FLAT_CIDR=${TEMPEST_FLAT_CIDR:-"172.29.248.0/22"}