lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sar...@apache.org
Subject [2/5] lucene-solr:branch_7_4: SOLR-12434: Fix 'bin/solr config' endless loop parsing cmdline args
Date Wed, 13 Jun 2018 17:35:39 GMT
SOLR-12434: Fix 'bin/solr config' endless loop parsing cmdline args


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/6d969a4b
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/6d969a4b
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/6d969a4b

Branch: refs/heads/branch_7_4
Commit: 6d969a4b8e0a3b1741d71a8330d78a870960894e
Parents: dc4ef0a
Author: Steve Rowe <sarowe@apache.org>
Authored: Tue Jun 12 20:56:57 2018 -0400
Committer: Steve Rowe <sarowe@apache.org>
Committed: Wed Jun 13 13:33:21 2018 -0400

----------------------------------------------------------------------
 solr/bin/solr | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6d969a4b/solr/bin/solr
----------------------------------------------------------------------
diff --git a/solr/bin/solr b/solr/bin/solr
index 4ea9d62..9384525 100755
--- a/solr/bin/solr
+++ b/solr/bin/solr
@@ -912,6 +912,7 @@ if [[ "$SCRIPT_CMD" == "config" ]]; then
 
   if [ $# -gt 0 ]; then
     while true; do
+      echo "Got here #1"
       case "$1" in
           -z|-zkhost|-zkHost)
               if [[ -z "$2" || "${2:0:1}" == "-" ]]; then
@@ -930,11 +931,17 @@ if [[ "$SCRIPT_CMD" == "config" ]]; then
               shift 2
           ;;
           *)  # Pass through all other params
-              CONFIG_PARAMS+=($1)
+              if [ "$1" != "" ]; then
+                CONFIG_PARAMS+=($1)
+                shift
+              else
+                break
+              fi
           ;;
       esac
     done
   fi
+echo run_tool config -zkHost "$ZK_HOST" -scheme "$SOLR_URL_SCHEME" "${CONFIG_PARAMS[@]}"
   run_tool config -zkHost "$ZK_HOST" -scheme "$SOLR_URL_SCHEME" "${CONFIG_PARAMS[@]}"
   exit $?
 fi


Mime
View raw message