From a9a574a01847761f07e7d30224aae4dd6b654cd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20Wanzenb=C3=B6ck?= Date: Fri, 5 Jul 2024 09:43:16 +0200 Subject: [PATCH] test: configure centos7 repos --- tests/provision.toml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/provision.toml b/tests/provision.toml index 8c64a94..11ba519 100644 --- a/tests/provision.toml +++ b/tests/provision.toml @@ -15,6 +15,15 @@ if command -v apt-get ; then elif command -v dnf ; then dnf install -y rsync hostname elif command -v yum ; then + is_centos7() { + . /etc/os-release + [ "$ID" = "centos" ] && [ "$VERSION_ID" -eq 7 ] + } + + if is_centos7 ; then + sed -e 's/^mirrorlist=/#mirrorlist=/' -e 's%^#baseurl=http://mirror.centos.org%baseurl=http://vault.centos.org%' -i /etc/yum.repos.d/*.repo + fi + yum install -y rsync hostname fi