[Spacewalk-list] centos-base.repo

John Hodrien J.H.Hodrien at leeds.ac.uk
Wed Oct 20 13:24:00 UTC 2010


On Wed, 20 Oct 2010, Marco Giunta wrote:

> Hi,
> I use this simple sed script in a kickstart snippet to turn off the mirrors:
>
>
> # Disable CentOS Base repos
> cat > /tmp/sed.txt <<EOF
> /gpgcheck/ {
>     n
>     /enabled/! {
>         i\enabled=0
>     }
> }
> EOF
> sed -i -f /tmp/sed.txt /etc/yum.repos.d/CentOS-Base.repo
>
>
> Give it a try... ;-)

Downside is that the repos aren't disabled before the rhnreg_ks (so any
activation key installed packages will use those repos).  Also, and I accept
this is a minor risk, package updates in future risk wiping out this, or
adding other repo files to that directory.  Use of a custom directory in the
yum.conf avoids this, and yum package updates preserve changes to the
yum.conf.

jh




More information about the Spacewalk-list mailing list