From a8c057d95efc13fe7f56a1294e0768cdb56988f8 Mon Sep 17 00:00:00 2001 From: jjhua Date: Tue, 7 May 2013 05:41:54 +0000 Subject: [PATCH] fixed bug 3259. Checked the code into 2.8-pcm git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8-pcm@16203 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT/postscripts/addsiteyum | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/xCAT/postscripts/addsiteyum b/xCAT/postscripts/addsiteyum index 853ef0d9b..9e980dcb3 100755 --- a/xCAT/postscripts/addsiteyum +++ b/xCAT/postscripts/addsiteyum @@ -9,10 +9,16 @@ do if [ ! -r "$i" ]; then continue fi - rm -rf /etc/yum.repos.d/* TARGFILE=`basename $i` TARGFILE=`echo $TARGFILE|sed -e s/.tmpl$/.repo/` sed -e s!#INSTSERVER#!$MASTER! $i > /etc/yum.repos.d/$TARGFILE + + # disable the internet repos which are created by addsiteyum + if [ -r "/etc/yum.repos.d/CentOS-Base.repo" ]; then + TMP=`sed -e '/enabled/d' /etc/yum.repos.d/CentOS-Base.repo | sed -e '/^gpgkey/i enabled=0'` + echo "$TMP" > /etc/yum.repos.d/CentOS-Base.repo + fi + done exit 0