Centos 7 EOL broke mirrors
As of July 1st 2024: Could not resolve host: mirrorlist.centos.org This is expected due to EOL dates.
This commit is contained in:
parent
2425281317
commit
4f67b39d26
1 changed files with 11 additions and 0 deletions
|
@ -6,10 +6,21 @@ set -ex
|
||||||
MACHINE=$(uname -m)
|
MACHINE=$(uname -m)
|
||||||
|
|
||||||
if grep -i "centos" /etc/system-release >/dev/null; then
|
if grep -i "centos" /etc/system-release >/dev/null; then
|
||||||
|
# As of 7/1/2024 mirrorlist.centos.org has been taken offline, so adjust accordingly
|
||||||
|
sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo
|
||||||
|
sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo
|
||||||
|
sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo
|
||||||
|
|
||||||
# Centos 7 derivatives have too old of a git version to run our generate script
|
# Centos 7 derivatives have too old of a git version to run our generate script
|
||||||
# uninstall and ignore failures
|
# uninstall and ignore failures
|
||||||
yum remove -y git
|
yum remove -y git
|
||||||
yum -y install epel-release centos-release-scl
|
yum -y install epel-release centos-release-scl
|
||||||
|
|
||||||
|
# The release packages reinstate the mirrors, undo that again
|
||||||
|
sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo
|
||||||
|
sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo
|
||||||
|
sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo
|
||||||
|
|
||||||
yum -y install dnf
|
yum -y install dnf
|
||||||
if [ "${MACHINE}" = "x86_64" ]; then
|
if [ "${MACHINE}" = "x86_64" ]; then
|
||||||
yum -y install https://repo.ius.io/ius-release-el7.rpm
|
yum -y install https://repo.ius.io/ius-release-el7.rpm
|
||||||
|
|
Loading…
Reference in a new issue