From b7f8af5e34f4cdfceccd6568a39d681ea5fbcf98 Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Mon, 5 Jun 2017 14:09:37 -0400 Subject: [PATCH 1/3] When go-xcat prompts the user to continue, prompt until y or n is specified before aborting. --- xCAT-server/share/xcat/tools/go-xcat | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/xCAT-server/share/xcat/tools/go-xcat b/xCAT-server/share/xcat/tools/go-xcat index b09adea6d..673bc20b4 100755 --- a/xCAT-server/share/xcat/tools/go-xcat +++ b/xCAT-server/share/xcat/tools/go-xcat @@ -1567,14 +1567,22 @@ case "${GO_XCAT_ACTION}" in then echo echo "xCAT is going to be ${GO_XCAT_ACTION/%e/}ed." - read -r -p "Continue? [y/n] " - case "${REPLY}" in - "Y"*|"y"*) - ;; - *) - echo "Aborting ..." - exit 0 - esac + while true; do + + read -r -p "Continue? [y/n] " + case "${REPLY}" in + "Y"*|"y"*) + break + ;; + "N"*|"n"*) + echo "Good-bye!" + exit 0 + ;; + *) + echo "Invalid response!" + ;; + esac + done fi # Use `-y' here. Since the STDOUT is redirect to tee. # `yum' does not display the prompt message properly when From 65615ce7e9d7d73b3537710041fb845258ffc751 Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Mon, 5 Jun 2017 14:18:30 -0400 Subject: [PATCH 2/3] Remove the quotes around the source command --- xCAT-server/share/xcat/tools/go-xcat | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/xCAT-server/share/xcat/tools/go-xcat b/xCAT-server/share/xcat/tools/go-xcat index 673bc20b4..3787ed9d4 100755 --- a/xCAT-server/share/xcat/tools/go-xcat +++ b/xCAT-server/share/xcat/tools/go-xcat @@ -1653,10 +1653,11 @@ case "${GO_XCAT_ACTION}" in If this is the very first time xCAT has been installed, run the following commands to set environment variables into your PATH: - for sh, - \`source /etc/profile.d/xcat.sh' - or csh, - \`source /etc/profile.d/xcat.csh' + For sh: + source /etc/profile.d/xcat.sh + + For csh: + source /etc/profile.d/xcat.csh EOF ;; "update") From a770ed67269a063d71d86b4e638b5547cd96d110 Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Tue, 27 Jun 2017 15:09:24 -0400 Subject: [PATCH 3/3] bump up the version of go-xcat --- xCAT-server/share/xcat/tools/go-xcat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-server/share/xcat/tools/go-xcat b/xCAT-server/share/xcat/tools/go-xcat index 3787ed9d4..d9d12e3b5 100755 --- a/xCAT-server/share/xcat/tools/go-xcat +++ b/xCAT-server/share/xcat/tools/go-xcat @@ -2,7 +2,7 @@ # # go-xcat - Install xCAT automatically. # -# Version 1.0.19 +# Version 1.0.20 # # Copyright (C) 2016 International Business Machines # Eclipse Public License, Version 1.0 (EPL-1.0)