diff --git a/scripts/bootstrap-aio.sh b/scripts/bootstrap-aio.sh index e0a1d6165e..748cbd766a 100755 --- a/scripts/bootstrap-aio.sh +++ b/scripts/bootstrap-aio.sh @@ -44,10 +44,10 @@ export NEUTRON_FATAL_DEPRECATIONS=${NEUTRON_FATAL_DEPRECATIONS:-"no"} export NOVA_FATAL_DEPRECATIONS=${NOVA_FATAL_DEPRECATIONS:-"no"} export TEMPEST_FATAL_DEPRECATIONS=${TEMPEST_FATAL_DEPRECATIONS:-"no"} -# Ubuntu repos +# Ubuntu Repository Determination (based on existing host OS configuration) UBUNTU_RELEASE=$(lsb_release -sc) -UBUNTU_REPO=${UBUNTU_REPO:-"https://mirror.rackspace.com/ubuntu"} -UBUNTU_SEC_REPO=${UBUNTU_SEC_REPO:-"https://mirror.rackspace.com/ubuntu"} +UBUNTU_REPO=${UBUNTU_REPO:-$(awk "/^deb .*ubuntu\/? ${UBUNTU_RELEASE} main/ {print \$2; exit}" /etc/apt/sources.list)} +UBUNTU_SEC_REPO=${UBUNTU_SEC_REPO:-$(awk "/^deb .*ubuntu\/? ${UBUNTU_RELEASE}-security main/ {print \$2; exit}" /etc/apt/sources.list)} ## Library Check ------------------------------------------------------------- @@ -78,19 +78,14 @@ apt-get update && apt-get install -y apt-transport-https # Set the host repositories to only use the same ones, always, for the sake of consistency. cat > /etc/apt/sources.list <