From 41268dba01f2780836861a12ae780cf7ef24d300 Mon Sep 17 00:00:00 2001 From: Zhongwen Deng Date: Thu, 5 May 2022 15:59:14 +0800 Subject: [PATCH] fix: can't get emqx's priv_dir when whitespace in install path --- apps/emqx/etc/emqx_cloud/vm.args | 2 +- apps/emqx/etc/emqx_edge/vm.args | 2 +- bin/emqx | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/emqx/etc/emqx_cloud/vm.args b/apps/emqx/etc/emqx_cloud/vm.args index 7a55ac26c..22c350509 100644 --- a/apps/emqx/etc/emqx_cloud/vm.args +++ b/apps/emqx/etc/emqx_cloud/vm.args @@ -120,7 +120,7 @@ -shutdown_time 30000 ## patches dir --pa {{ platform_data_dir }}/patches +-pa "{{ platform_data_dir }}/patches" ## Mnesia thresholds -mnesia dump_log_write_threshold 5000 diff --git a/apps/emqx/etc/emqx_edge/vm.args b/apps/emqx/etc/emqx_edge/vm.args index f63d2f976..f9fcd675d 100644 --- a/apps/emqx/etc/emqx_edge/vm.args +++ b/apps/emqx/etc/emqx_edge/vm.args @@ -118,7 +118,7 @@ -shutdown_time 10000 ## patches dir --pa {{ platform_data_dir }}/patches +-pa "{{ platform_data_dir }}/patches" ## Mnesia thresholds -mnesia dump_log_write_threshold 5000 diff --git a/bin/emqx b/bin/emqx index 29fdd53a8..bc9cc1ea7 100755 --- a/bin/emqx +++ b/bin/emqx @@ -289,7 +289,7 @@ compatiblity_info() { -eval "$COMPATIBILITY_CHECK" } -# Collect Eralng/OTP runtime sanity and compatibility in one go +# Collect Erlang/OTP runtime sanity and compatibility in one go if [ "$IS_BOOT_COMMAND" = 'yes' ]; then # Read BUILD_INFO early as the next commands may mess up the shell BUILD_INFO="$(cat "${REL_DIR}/BUILD_INFO")" @@ -514,7 +514,7 @@ generate_config() { TMP_ARG_FILE="$CONFIGS_DIR/vm.args.tmp" cp "$EMQX_ETC_DIR/vm.args" "$TMP_ARG_FILE" echo "" >> "$TMP_ARG_FILE" - echo "-pa ${REL_DIR}/consolidated" >> "$TMP_ARG_FILE" + echo "-pa \"${REL_DIR}/consolidated\"" >> "$TMP_ARG_FILE" ## read lines from generated vm.