components/rabbitmq/patches/env.patch
author Rich Burridge <rich.burridge@oracle.com>
Thu, 17 Apr 2014 10:00:40 -0700
changeset 1833 0edb05d72e6b
parent 1484 01108fd9c6ef
permissions -rw-r--r--
16575074 stat could support birthtime/crtime on ZFS

This allows us to source rabbitmq-env from a script that doesn't live in
the same directory.

--- rabbitmq-server-2.8.7/scripts/rabbitmq-env	Thu Sep 27 04:08:40 2012
+++ rabbitmq-server-2.8.7/scripts/rabbitmq-env	Mon Nov  5 11:10:09 2012
@@ -32,7 +32,7 @@
     fi
 done
 
-SCRIPT_DIR=`dirname $SCRIPT_PATH`
+SCRIPT_DIR=${SCRIPT_DIR:-`dirname $SCRIPT_PATH`}
 RABBITMQ_HOME="${SCRIPT_DIR}/.."
 [ "x" = "x$HOSTNAME" ] && HOSTNAME=`env hostname`
 NODENAME=rabbit@${HOSTNAME%%.*}