Skip to content

Commit 9512351

Browse files
committed
rpm: set mirror's baseurl explicitly
As CentOS 7 reaches EOL, so it is expected that mirrorlist will be broken gradually, so set baseurl explicitly to improve network connectivity. Signed-off-by: Kentaro Hayashi <[email protected]>
1 parent ef6df2b commit 9512351

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

fluent-package/test-install-in-docker.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ exit 0
3434

3535
function setup_dnf_user()
3636
{
37+
case $ID in
38+
*centos*)
39+
sed -i -e 's,^mirrorlist=,#mirrorlist,' /etc/yum.repos.d/CentOS-Base.repo
40+
sed -i -e 's,^#baseurl=http://mirror.centos.org/centos/\$releasever/,baseurl=http://ftp.iij.ad.jp/pub/linux/centos/7.9.2009/,' /etc/yum.repos.d/CentOS-Base.repo
41+
cat /etc/yum.repos.d/CentOS-Base.repo
42+
;;
43+
esac
3744
$DNF update -y
3845
case $VERSION_ID in
3946
*2023*|*9\.*)

0 commit comments

Comments
 (0)