Merge "Fedora: Add support for configuring Yum mirrors"
This commit is contained in:
commit
d69c0fce86
@ -1,3 +1,11 @@
|
||||
Use Fedora cloud images as the baseline for built disk images.
|
||||
|
||||
If you wish to use a Fedora Yum mirror you can set DIB\_DISTRIBUTION\_MIRROR
|
||||
before running bin/disk-image-create. Example:
|
||||
|
||||
DIB\_DISTRIBUTION\_MIRROR=http://download.fedoraproject.org/pub/fedora/linux
|
||||
|
||||
This URL should point to the directory containing the releases/updates/
|
||||
development/and extras directories.
|
||||
|
||||
For further details see the redhat-common README.
|
||||
|
11
elements/fedora/pre-install.d/01-set-fedora-mirror
Executable file
11
elements/fedora/pre-install.d/01-set-fedora-mirror
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
|
||||
DIB_DISTRIBUTION_MIRROR=${DIB_DISTRIBUTION_MIRROR:-}
|
||||
|
||||
[ -n "$DIB_DISTRIBUTION_MIRROR" ] || exit 0
|
||||
|
||||
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
|
||||
done
|
Loading…
Reference in New Issue
Block a user