Do not update apt if devstack is in OFFLINE mode
Also, do not add trusty-backports repository if it already exists. Change-Id: I24211458f32dc3895028f45b9cf26bc5a6fa0f3c
This commit is contained in:
parent
4ef9bb7ccd
commit
eb2a61b4e9
|
@ -7,9 +7,15 @@ function neutron_lbaas_install {
|
||||||
|
|
||||||
function neutron_agent_lbaas_install_agent_packages {
|
function neutron_agent_lbaas_install_agent_packages {
|
||||||
if is_ubuntu; then
|
if is_ubuntu; then
|
||||||
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse" -y
|
if [[ ${OFFLINE} == false ]]; then
|
||||||
sudo apt-get update
|
BACKPORT="deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse"
|
||||||
sudo apt-get install haproxy -t trusty-backports
|
BACKPORT_EXISTS=$(grep ^ /etc/apt/sources.list /etc/apt/sources.list.d/* | grep "${BACKPORT}")
|
||||||
|
if [[ -z "${BACKPORT_EXISTS}" ]]; then
|
||||||
|
sudo add-apt-repository "${BACKPORT}" -y
|
||||||
|
fi
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install haproxy -t trusty-backports
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
if is_fedora || is_suse; then
|
if is_fedora || is_suse; then
|
||||||
install_package haproxy
|
install_package haproxy
|
||||||
|
|
Loading…
Reference in New Issue