From 33c5f1cf8862dbce6fb8305342dca5e843348f60 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Wed, 5 Apr 2023 10:21:43 +0800 Subject: [PATCH] chore: cus name support in shellArgument (#20754) * chore: refactor cus prompt * fix: client name in install.sh * fix: -Wno-reserved-user-defined-literal * fix: update taos-tools commit * fix: include/os/osDir.h * fix: check cus name * fix: makepkg.sh * chore: update taos-tools d194dc9 * fix: cus name * fix: change adapter prefix * fix: tools/*.sh * fix: scripts * fix: ../../packaging/tools/install_client.sh * chore: cus domain in script * fix: cus name in packaging/tools/install.sh * fix: cus name in ../../packaging/tools/remove.sh * fix: don't edit origin file * fix: remove brand name * fix: update taos-tools * fix: cus name in log * fix: compile error without cuc name --------- Co-authored-by: chenhaoran --- cmake/taostools_CMakeLists.txt.in | 2 +- source/dnode/mgmt/exe/dmMain.c | 17 ++++++++++++++++- tools/shell/src/shellArguments.c | 2 +- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/cmake/taostools_CMakeLists.txt.in b/cmake/taostools_CMakeLists.txt.in index 2de3881dd2..a4edc47c0b 100644 --- a/cmake/taostools_CMakeLists.txt.in +++ b/cmake/taostools_CMakeLists.txt.in @@ -2,7 +2,7 @@ # taos-tools ExternalProject_Add(taos-tools GIT_REPOSITORY https://github.com/taosdata/taos-tools.git - GIT_TAG 273a3fe + GIT_TAG 53d14fa SOURCE_DIR "${TD_SOURCE_DIR}/tools/taos-tools" BINARY_DIR "" #BUILD_IN_SOURCE TRUE diff --git a/source/dnode/mgmt/exe/dmMain.c b/source/dnode/mgmt/exe/dmMain.c index d3cffaa185..892b4a9a40 100644 --- a/source/dnode/mgmt/exe/dmMain.c +++ b/source/dnode/mgmt/exe/dmMain.c @@ -19,6 +19,21 @@ #include "tconfig.h" #include "tglobal.h" +#if defined(CUS_NAME) || defined(CUS_PROMPT) || defined(CUS_EMAIL) +#include "cus_name.h" +#else +#ifndef CUS_NAME + #define CUS_NAME "TDengine" +#endif + +#ifndef CUS_PROMPT + #define CUS_PROMPT "taos" +#endif + +#ifndef CUS_EMAIL + #define CUS_EMAIL "" +#endif +#endif // clang-format off #define DM_APOLLO_URL "The apollo string to use when configuring the server, such as: -a 'jsonFile:./tests/cfg.json', cfg.json text can be '{\"fqdn\":\"td1\"}'." #define DM_CFG_DIR "Configuration directory." @@ -228,7 +243,7 @@ static void dmDumpCfg() { } static int32_t dmInitLog() { - return taosCreateLog("taosdlog", 1, configDir, global.envCmd, global.envFile, global.apolloUrl, global.pArgs, 0); + return taosCreateLog(CUS_PROMPT"dlog", 1, configDir, global.envCmd, global.envFile, global.apolloUrl, global.pArgs, 0); } static void taosCleanupArgs() { diff --git a/tools/shell/src/shellArguments.c b/tools/shell/src/shellArguments.c index f7008548f6..1eb4edb28a 100644 --- a/tools/shell/src/shellArguments.c +++ b/tools/shell/src/shellArguments.c @@ -46,7 +46,7 @@ #define SHELL_VERSION "Print program version." #ifdef WEBSOCKET -#define SHELL_DSN "Use dsn to connect to the TDengine cloud server or to a remote server which provides WebSocket connection." +#define SHELL_DSN "Use dsn to connect to the cloud server or to a remote server which provides WebSocket connection." #define SHELL_REST "Use RESTful mode when connecting." #define SHELL_TIMEOUT "Set the timeout for websocket query in seconds, default is 30." #endif