mirror of
https://github.com/ovh/the-bastion.git
synced 2025-09-10 15:04:15 +08:00
Merge pull request #83 from ovh/centos
fix: packages-check: centos8: handle new repo names
This commit is contained in:
commit
b82f80defb
1 changed files with 6 additions and 2 deletions
|
@ -85,8 +85,12 @@ elif echo "$DISTRO_LIKE" | grep -q -w rhel; then
|
||||||
|
|
||||||
if [ "$opt_install" = 1 ]; then
|
if [ "$opt_install" = 1 ]; then
|
||||||
if [ "$DISTRO_VERSION_MAJOR" = 8 ]; then
|
if [ "$DISTRO_VERSION_MAJOR" = 8 ]; then
|
||||||
sed -i -e 's/enabled=.*/enabled=1/g' /etc/yum.repos.d/CentOS-PowerTools.repo
|
# in December 2020, they added "-Linux" to their repo name, so trying both combinations
|
||||||
sed -i -e 's/enabled=.*/enabled=1/g' /etc/yum.repos.d/CentOS-Extras.repo
|
for repo in CentOS-PowerTools CentOS-Extras CentOS-Linux-PowerTools CentOS-Linux-Extras
|
||||||
|
do
|
||||||
|
test -f /etc/yum.repos.d/$repo.repo || continue
|
||||||
|
sed -i -e 's/enabled=.*/enabled=1/g' /etc/yum.repos.d/$repo.repo
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
yum install -y epel-release
|
yum install -y epel-release
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
|
|
Loading…
Add table
Reference in a new issue