Browse Source

Merge "Fix regex for mirror URL substitution"

tags/2.31.0
Zuul 2 months ago
parent
commit
9b00377f31
3 changed files with 3 additions and 3 deletions
  1. +1
    -1
      diskimage_builder/elements/centos7/pre-install.d/01-set-centos-mirror
  2. +1
    -1
      diskimage_builder/elements/epel/pre-install.d/05-rpm-epel-release
  3. +1
    -1
      diskimage_builder/elements/fedora/pre-install.d/01-set-fedora-mirror

+ 1
- 1
diskimage_builder/elements/centos7/pre-install.d/01-set-centos-mirror View File

@@ -12,4 +12,4 @@ DIB_DISTRIBUTION_MIRROR=${DIB_DISTRIBUTION_MIRROR:-}

# Only set the mirror for the Base, Extras and Updates repositories
# The others arn't enabled and do not exist on all mirrors
sed -e "s|^#baseurl=http://mirror.centos.org/centos|baseurl=$DIB_DISTRIBUTION_MIRROR|;/^mirrorlist=/d" -i /etc/yum.repos.d/CentOS-Base.repo
sed -e "s|^#baseurl=http[s]*://mirror.centos.org/centos|baseurl=$DIB_DISTRIBUTION_MIRROR|;/^mirrorlist=/d" -i /etc/yum.repos.d/CentOS-Base.repo

+ 1
- 1
diskimage_builder/elements/epel/pre-install.d/05-rpm-epel-release View File

@@ -45,5 +45,5 @@ DIB_EPEL_MIRROR=${DIB_EPEL_MIRROR:-}
[ -n "$DIB_EPEL_MIRROR" ] || exit 0

# Set the EPEL mirror to use
sed -e "s|^#baseurl=http://download.fedoraproject.org/pub/epel|baseurl=$DIB_EPEL_MIRROR|;/^mirrorlist=/d;/^metalink=/d" -i /etc/yum.repos.d/epel.repo
sed -e "s|^#baseurl=http[s]*://download.fedoraproject.org/pub/epel|baseurl=$DIB_EPEL_MIRROR|;/^mirrorlist=/d;/^metalink=/d" -i /etc/yum.repos.d/epel.repo


+ 1
- 1
diskimage_builder/elements/fedora/pre-install.d/01-set-fedora-mirror View File

@@ -19,5 +19,5 @@ if [[ ${DIB_RELEASE} -gt 27 ]]; then
fi

for FILE in /etc/yum.repos.d/fedora.repo /etc/yum.repos.d/fedora-updates.repo /etc/yum.repos.d/fedora-updates-testing.repo; do
sudo sed -e "s|^#baseurl=http://download.fedoraproject.org/pub/fedora/linux|baseurl=$DIB_DISTRIBUTION_MIRROR|;/^metalink/d" -i $FILE
sudo sed -e "s|^#baseurl=http[s]*://download.fedoraproject.org/pub/fedora/linux|baseurl=$DIB_DISTRIBUTION_MIRROR|;/^metalink/d" -i $FILE
done

Loading…
Cancel
Save