Use external centos7-rt if present
Depending on the environment we execute this we need different configuration for the centos7-rt repo, like at RDO zuul ci we have to use nodepool mirrors, this patch check for a centos7-rt repo and enables it if it's not present just creates a default one Change-Id: I630a399d95752b1fb1e30220a582ace8d7b97f18 Related-Bug: #1814872
This commit is contained in:
parent
53f4899ce4
commit
d313a060c8
@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash -x
|
||||||
|
|
||||||
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||||
set -x
|
set -x
|
||||||
@ -7,6 +7,8 @@ set -eu
|
|||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
if [[ "$DISTRO_NAME" == *"centos"* ]]; then
|
if [[ "$DISTRO_NAME" == *"centos"* ]]; then
|
||||||
|
current_rt_repo=$(yum repolist all|grep "centos7-rt" |awk '{print $1}'| head -n 1 || true)
|
||||||
|
if [[ "$current_rt_repo" == "" ]]; then
|
||||||
cat << EOF > /etc/yum.repos.d/centos7-rt.repo
|
cat << EOF > /etc/yum.repos.d/centos7-rt.repo
|
||||||
[centos7-rt]
|
[centos7-rt]
|
||||||
name=CentOS 7 - Realtime
|
name=CentOS 7 - Realtime
|
||||||
@ -14,4 +16,7 @@ baseurl=http://mirror.centos.org/centos/7/rt/x86_64/
|
|||||||
enabled=1
|
enabled=1
|
||||||
gpgcheck=0
|
gpgcheck=0
|
||||||
EOF
|
EOF
|
||||||
|
else
|
||||||
|
yum-config-manager --enable $current_rt_repo
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user