From 35bbcafc43bc10259757ee735c001c77b583cb15 Mon Sep 17 00:00:00 2001 From: ligc Date: Mon, 22 Dec 2014 16:14:04 +0800 Subject: [PATCH] fix for bug 4489: shell syntax problem in otherpkgs --- xCAT/postscripts/otherpkgs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT/postscripts/otherpkgs b/xCAT/postscripts/otherpkgs index b2109c3d9..70a8b3a35 100755 --- a/xCAT/postscripts/otherpkgs +++ b/xCAT/postscripts/otherpkgs @@ -428,7 +428,7 @@ fi ########### ##start generating the os pkg repositories -if ( ("$OSVER" ge "sles11") && [ $haszypper -eq 1 ] ); then +if ( [[ "$OSVER" > "sles11" ]] || [[ "$OSVER" == "sles11" ]] ) && [ $haszypper -eq 1 ] ; then old_repo=`zypper lr |grep -e "^[0-9]" | cut -f2 -d '|'` for x in $old_repo do @@ -701,7 +701,7 @@ while [ $op_index -le $OTHERPKGS_INDEX ]; do fi elif [ $haszypper -eq 1 ]; then #use zypper - if ( "$OSVER" ge "sles11" ); then + if ( [[ "$OSVER" > "sles11" ]] || [[ "$OSVER" == "sles11" ]] ); then result=`zypper ar -c $REPOFILE` else result=`zypper sa -r $REPOFILE << EOF