Revert "Remove 03-centos-rt element - the rt repo no longer exists"

This reverts commit 8a2fa38ec1.

Change-Id: Ia2e7f2b0e5b8e707681dbd08a634b4b0abe61b3c
This commit is contained in:
Ronelle Landy 2020-11-17 14:05:22 +00:00
parent 8a2fa38ec1
commit 83378d8192
1 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,22 @@
#!/bin/bash -x
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
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
[centos7-rt]
name=CentOS 7 - Realtime
baseurl=http://mirror.centos.org/centos/7/rt/x86_64/
enabled=1
gpgcheck=0
EOF
else
yum-config-manager --enable $current_rt_repo
fi
fi