diff --git a/apps/emqx_gateway/src/emqx_gateway_schema.erl b/apps/emqx_gateway/src/emqx_gateway_schema.erl index 70528d2bc..3811d56c6 100644 --- a/apps/emqx_gateway/src/emqx_gateway_schema.erl +++ b/apps/emqx_gateway/src/emqx_gateway_schema.erl @@ -297,7 +297,7 @@ sc_meta(Type, Meta) -> hoconsc:mk(Type, Meta). map(Name, Type) -> - hoconsc: map(Name, Type). + hoconsc:map(Name, Type). ref(StructName) -> ref(?MODULE, StructName). diff --git a/bin/emqx b/bin/emqx index e6cd421f1..db3c8a798 100755 --- a/bin/emqx +++ b/bin/emqx @@ -355,6 +355,16 @@ case "$1" in ;; esac +IS_NO_CONNECTION_COMMAND='no' +case "$1" in + cold_eval) + IS_NO_CONNECTION_COMMAND='yes' + ;; + *) + ;; +esac + + ## Possible ways to configure emqx node name: ## 1. configure node.name in emqx.conf ## 2. override with environment variable EMQX_NODE_NAME @@ -362,18 +372,17 @@ esac ## or long name (with '@') e.g. 'emqx@example.net' or 'emqx@127.0.0.1' NAME="${EMQX_NODE_NAME:-}" if [ -z "$NAME" ]; then - if [ "$IS_BOOT_COMMAND" = 'no' ]; then + if [ "$IS_BOOT_COMMAND" = 'yes' ]; then + # for boot commands, inspect emqx.conf for node name + NAME="$(call_hocon -s $SCHEMA_MOD -c "$RUNNER_ETC_DIR"/emqx.conf get node.name | tr -d \")" + elif [ "$IS_NO_CONNECTION_COMMAND" = 'yes' ]; then + # this command requires no connection to the target beam node, do nothing + : + else # for non-boot commands, inspect vm.