On Wed, 20 Oct 2010, rob morrien wrote:

Hello,

At this moment i use on most off my systems centos 5 and higher.

Every time when we kickstart a machine we have to update the file
CentOS-Base.repo and add the line enabled=0 , to turn off the mirrors for
the yum process.

Has somebody make a script for this ?
If so can we have this available?

Better way of doing it IMO (as tested on 0.7) is below.  By doing it as a pre
means that by the time rhnreg_ks is kicked into life those repos are not used.

pre script:

mkdir -p /tmp/ks-tree-shadow/etc/yum.repos.d/custom

cat << EOF > /tmp/ks-tree-shadow/etc/yum.conf
[main]
cachedir=/var/cache/yum
reposdir=/etc/yum.repos.d/custom/
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
distroverpkg=centos-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1

# Note: yum-RHN-plugin doesn't honor this.
metadata_expire=1h

# Default.
# installonly_limit = 3

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d/custom
EOF

_______________________________________________
Spacewalk-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/spacewalk-list

Reply via email to