From ab04cdafc33a899d156e391d282d3bace93be7bf Mon Sep 17 00:00:00 2001 From: jjhua Date: Tue, 16 Apr 2013 05:36:51 +0000 Subject: [PATCH] only remove the repositories which were created by xCAT for sles git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@15979 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT/postscripts/ospkgs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xCAT/postscripts/ospkgs b/xCAT/postscripts/ospkgs index fac076316..1ecf66855 100755 --- a/xCAT/postscripts/ospkgs +++ b/xCAT/postscripts/ospkgs @@ -497,7 +497,9 @@ elif ( pmatch "$OSVER" "sles11*" ); 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` if [ $debug -ne 0 ]; then