fixed bug 3506, at the beginning of the ospkgs/otherpkgs, only remove the repos which are created by xCAT.

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@15998 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jjhua 2013-04-17 07:05:21 +00:00
parent 439985c34d
commit a2247f0170
2 changed files with 6 additions and 3 deletions

View File

@ -706,7 +706,7 @@ else
result=`rm /etc/yum.repos.d/local-repository.repo 2>&1`
fi
rm /etc/yum.repos.d/$OSVER-path*.repo >/dev/null 2>&1
result=`rm /etc/yum.repos.d/xCAT*.repo 2>&1`
result=`rm /etc/yum.repos.d/xCAT-$OSVER-path*.repo 2>&1`
fi

View File

@ -424,7 +424,9 @@ if ( pmatch "$OSVER" "sles11*" && [ $haszypper -eq 1 ] ); then
old_repo=`zypper lr |grep -e "^[0-9]" | cut -f2 -d '|'`
for x in $old_repo
do
result=`zypper rr $x`
if ( ( pmatch "$x" "xCAT-$OSVER-path*" ) || ( pmatch "$x" "$OSVER-path*" ) ); then
result=`zypper rr "$x"`
fi
done
result=`zypper --non-interactive refresh 2>&1`
@ -491,7 +493,8 @@ elif ( pmatch "$OSVER" "rhel*" && [ $hasyum -eq 1 ] ); then
if [ -r "/etc/yum.repos.d/local-repository.repo" ]; then
result=`rm /etc/yum.repos.d/local-repository.repo 2>&1`
fi
result=`rm /etc/yum.repos.d/xCAT*.repo 2>&1`
rm /etc/yum.repos.d/$OSVER-path*.repo >/dev/null 2>&1
result=`rm /etc/yum.repos.d/xCAT-$OSVER-path*.repo 2>&1`
result=`yum clean all`