From a2cb534bb6f5b1fc2b7ca75e5156f3c9f554cebf Mon Sep 17 00:00:00 2001 From: root Date: Mon, 4 May 2020 14:54:38 -0400 Subject: [PATCH] Changed code to handle the stable flag inside the swtich statement where we parse the command in the main program. --- xCAT-server/share/xcat/tools/go-xcat | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/xCAT-server/share/xcat/tools/go-xcat b/xCAT-server/share/xcat/tools/go-xcat index bf37f8326..355e2e089 100755 --- a/xCAT-server/share/xcat/tools/go-xcat +++ b/xCAT-server/share/xcat/tools/go-xcat @@ -1993,9 +1993,17 @@ do "-x"|"--xcat-version") shift GO_XCAT_VERSION="$1" + if [ "${GO_XCAT_VERSION}" = "stable" ]; + then + GO_XCAT_VERSION="latest" + fi ;; "--xcat-version="*) GO_XCAT_VERSION="${1##--xcat-version=}" + if [ "${GO_XCAT_VERSION}" = "stable" ]; + then + GO_XCAT_VERSION="latest" + fi ;; "-y"|"--yes") GO_XCAT_YES=("-y") @@ -2021,11 +2029,6 @@ do shift done -if [[ ${GO_XCAT_VERSION} == "stable" ]] - then - ${GO_XCAT_VERSION} = "latest" -fi - case "${GO_XCAT_ACTION}" in "away") GO_XCAT_YES=("-y")