From 7a4696596bbcccfedf5c6b6e25ad684ef30d9cea Mon Sep 17 00:00:00 2001 From: Paride Legovini Date: Fri, 25 Jan 2019 17:52:41 +0000 Subject: run-container: uncomment baseurl in yum.repos.d/*.repo when using a proxy When using a proxy it is often useful to know in advance which mirrors are to be contacted, so a whitelist can be set up. This is not easy when using the yum.conf(5) mirrorlist option, as the retrieved list of mirrors may change. The repository definition may also specify a canonical mirror with the 'baseurl' option; this option is often commented out by default to favor the usage of worldwide mirrors. This patch uncomments 'baseurl' when an http_proxy is being used, so the canonical mirror is used *in addition to* the mirrors retrieved from the mirrorlist. --- tools/run-container | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/run-container b/tools/run-container index 6dedb757..852f4d1e 100755 --- a/tools/run-container +++ b/tools/run-container @@ -373,6 +373,7 @@ wait_for_boot() { inside "$name" sh -c "echo proxy=$http_proxy >> /etc/yum.conf" inside "$name" sed -i s/enabled=1/enabled=0/ \ /etc/yum/pluginconf.d/fastestmirror.conf + inside "$name" sh -c "sed -i '/^#baseurl=/s/#//' /etc/yum.repos.d/*.repo" else debug 1 "do not know how to configure proxy on $OS_NAME" fi -- cgit v1.2.3