You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ha...@apache.org on 2022/11/02 01:40:42 UTC
[iotdb] branch master updated: [IOTDB-4230]fix start-cli.sh does not support -e (#7866)
This is an automated email from the ASF dual-hosted git repository.
haonan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new 388c988eb4 [IOTDB-4230]fix start-cli.sh does not support -e (#7866)
388c988eb4 is described below
commit 388c988eb422836449b512f0aab5ac61c9cc34e3
Author: Xiangdong Huang <hx...@apache.org>
AuthorDate: Wed Nov 2 09:40:36 2022 +0800
[IOTDB-4230]fix start-cli.sh does not support -e (#7866)
---
cli/src/assembly/resources/sbin/start-cli.sh | 37 +---------------------------
1 file changed, 1 insertion(+), 36 deletions(-)
diff --git a/cli/src/assembly/resources/sbin/start-cli.sh b/cli/src/assembly/resources/sbin/start-cli.sh
old mode 100644
new mode 100755
index 7a4e2ddb1b..137d04c0ad
--- a/cli/src/assembly/resources/sbin/start-cli.sh
+++ b/cli/src/assembly/resources/sbin/start-cli.sh
@@ -111,14 +111,8 @@ IOTDB_CLI_CONF=${IOTDB_HOME}/conf
MAIN_CLASS=org.apache.iotdb.cli.Cli
-if [ -d ${IOTDB_HOME}/lib ]; then
-LIB_PATH=${IOTDB_HOME}/lib
-else
-LIB_PATH=${IOTDB_HOME}/../lib
-fi
-
CLASSPATH=""
-for f in ${LIB_PATH}/*.jar; do
+for f in ${IOTDB_HOME}/lib/*.jar; do
CLASSPATH=${CLASSPATH}":"$f
done
@@ -134,35 +128,6 @@ else
JAVA=java
fi
-PARAMETERS="$@"
-
-# if [ $# -eq 0 ]
-# then
-# PARAMETERS="-h 127.0.0.1 -p 6667 -u root -pw root"
-# fi
-
-# Added parameters when default parameters are missing
-
-# sh version
-case "$PARAMETERS" in
-*"-pw "*) PARAMETERS=$PARAMETERS ;;
-* ) PARAMETERS="-pw root $PARAMETERS" ;;
-esac
-case "$PARAMETERS" in
-*"-u "*) PARAMETERS=$PARAMETERS ;;
-* ) PARAMETERS="-u root $PARAMETERS" ;;
-esac
-case "$PARAMETERS" in
-*"-p "*) PARAMETERS=$PARAMETERS ;;
-* ) PARAMETERS="-p 6667 $PARAMETERS" ;;
-esac
-case "$PARAMETERS" in
-*"-h "*) PARAMETERS=$PARAMETERS ;;
-* ) PARAMETERS="-h 127.0.0.1 $PARAMETERS" ;;
-esac
-
-# echo $PARAMETERS
-
set -o noglob
iotdb_cli_params="-Dlogback.configurationFile=${IOTDB_CLI_CONF}/logback-cli.xml"
exec "$JAVA" $iotdb_cli_params -cp "$CLASSPATH" "$MAIN_CLASS" $PARAMETERS