diff options
author | David Wragg <david@rabbitmq.com> | 2010-08-18 14:52:40 +0100 |
---|---|---|
committer | David Wragg <david@rabbitmq.com> | 2010-08-18 14:52:40 +0100 |
commit | 4afe4218c8cf9e3e57a0af0e587f8c6f90894575 (patch) | |
tree | 5d781dd5975a0c9a860bf5c9af7000d9704041d8 /scripts/rabbitmq-server | |
parent | dbded325f13be936a505e25c5c1110d66b75cbd0 (diff) | |
download | rabbitmq-server-4afe4218c8cf9e3e57a0af0e587f8c6f90894575.tar.gz |
Eliminate RABBITMQ_PLUGINS_EXPAND_DIRbug23145
There were a number of issues with RABBITMQ_PLUGINS_EXPAND_DIR:
- It was undocumented in the context of the generic unix package, and
if unwisely set could do an effective "rm -rf" in an unintended
location.
- It did not take account of the possibility that multiple nodes could
be starting at once, and so doing plugins activation
simultanteously.
Instead, use RABBITMQ_MNESIA_DIR/plugins-scratch. This avoids the
need to extend the generic unix package documentation, the location is
node-specific, and the distinctive plugins-scratch subdirectory
reduces the risk of unintended file deletions.
(transplanted from 064b8797493bb290156fb72a54f9e9276df0faed)
Diffstat (limited to 'scripts/rabbitmq-server')
-rwxr-xr-x | scripts/rabbitmq-server | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/scripts/rabbitmq-server b/scripts/rabbitmq-server index d52dc774..9310752f 100755 --- a/scripts/rabbitmq-server +++ b/scripts/rabbitmq-server @@ -39,7 +39,6 @@ CLUSTER_CONFIG_FILE=/etc/rabbitmq/rabbitmq_cluster.config CONFIG_FILE=/etc/rabbitmq/rabbitmq LOG_BASE=/var/log/rabbitmq MNESIA_BASE=/var/lib/rabbitmq/mnesia -PLUGINS_EXPAND_DIR=/var/lib/rabbitmq/plugins-scratch SERVER_START_ARGS= . `dirname $0`/rabbitmq-env @@ -70,7 +69,6 @@ fi [ "x" = "x$RABBITMQ_MNESIA_DIR" ] && RABBITMQ_MNESIA_DIR=${RABBITMQ_MNESIA_BASE}/${RABBITMQ_NODENAME} [ "x" = "x$RABBITMQ_PLUGINS_DIR" ] && RABBITMQ_PLUGINS_DIR="${RABBITMQ_HOME}/plugins" -[ "x" = "x$RABBITMQ_PLUGINS_EXPAND_DIR" ] && RABBITMQ_PLUGINS_EXPAND_DIR="${PLUGINS_EXPAND_DIR}" ## Log rotation [ "x" = "x$RABBITMQ_LOGS" ] && RABBITMQ_LOGS=${LOGS} @@ -91,14 +89,14 @@ if [ "x" = "x$RABBITMQ_NODE_ONLY" ]; then if erl \ -pa "$RABBITMQ_EBIN_ROOT" \ -rabbit plugins_dir "\"$RABBITMQ_PLUGINS_DIR\"" \ - -rabbit plugins_expand_dir "\"$RABBITMQ_PLUGINS_EXPAND_DIR\"" \ + -rabbit plugins_expand_dir "\"${RABBITMQ_MNESIA_DIR}/plugins-scratch\"" \ -rabbit rabbit_ebin "\"$RABBITMQ_EBIN_ROOT\"" \ -noinput \ -hidden \ -s rabbit_plugin_activator \ -extra "$@" then - RABBITMQ_BOOT_FILE="${RABBITMQ_PLUGINS_EXPAND_DIR}/rabbit" + RABBITMQ_BOOT_FILE="${RABBITMQ_MNESIA_DIR}/plugins-scratch/rabbit" RABBITMQ_EBIN_PATH="" else exit 1 |