[Spacewalk-list] CentOS repos reappear in /etc/yum.repos.d

FRANK Michael michael.frank at faurecia.com
Thu Nov 28 17:11:12 UTC 2019


Hello,

We do this with the following kickstart post-script:

echo -e "\n############# Removing default CentOS repositories ########\n"
/usr/bin/yum-config-manager --disable base updates extras centosplus
/usr/bin/yum-config-manager --disable cr
/usr/bin/yum-config-manager --disable base-debuginfo
/usr/bin/yum-config-manager --disable fasttrack
/usr/bin/yum-config-manager --disable c7-media
/usr/bin/yum-config-manager --disable base-source updates-source extras-source centosplus-source
/usr/bin/yum-config-manager --disable C7.0.1406-\*

Which sets all repos to enable=0

After that we do a yum -y update

To test that its persistent I did a quick "yum reinstall centos-release.x86_64"  and the enabled=0 is kept and original repos didn't showed up

I hope that helps.

BR

Michael



-----Original Message-----
From: spacewalk-list-bounces at redhat.com <spacewalk-list-bounces at redhat.com> On Behalf Of Brian Long
Sent: Wednesday, November 27, 2019 10:28 PM
To: spacewalk-list at redhat.com
Subject: Re: [Spacewalk-list] CentOS repos reappear in /etc/yum.repos.d

Quick-n-dirty kickstart postinstall command we run:
# Disabling CentOS Internet Repos
egrep '^\[.*\]' /etc/yum.repos.d/CentOS-*.repo | awk -F: '{print $2}'
| sed -e 's/\[//g' -e 's/\]//g' | xargs yum-config-manager --disable


_______________________________________________
Spacewalk-list mailing list
Spacewalk-list at redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-list


This electronic transmission (and any attachments thereto) is intended solely for the use of the addressee(s). It may contain confidential or legally privileged information. If you are not the intended recipient of this message, you must delete it immediately and notify the sender. Any unauthorized use or disclosure of this message is strictly prohibited.  Faurecia does not guarantee the integrity of this transmission and shall therefore never be liable if the message is altered or falsified nor for any virus, interception or damage to your system.





More information about the Spacewalk-list mailing list