From d42b15e420478dc45785fff6e00b863cc1f8a0f9 Mon Sep 17 00:00:00 2001
From: lutoff <lutoff@localhost>
Date: Thu, 18 Sep 2008 10:14:53 +0000
Subject: [PATCH] These changes are separating the current delivery into an "Install Layout" (the binaries) and an "Instance Layout" (the user data).
---
opends/resource/bin/_script-util.sh | 21 ++++++++++++++++++---
1 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/opends/resource/bin/_script-util.sh b/opends/resource/bin/_script-util.sh
index 7a70f6b..9830484 100644
--- a/opends/resource/bin/_script-util.sh
+++ b/opends/resource/bin/_script-util.sh
@@ -146,14 +146,21 @@
# Configure the appropriate CLASSPATH.
set_classpath() {
CLASSPATH=${INSTANCE_ROOT}/classes
- for JAR in "${INSTANCE_ROOT}"/lib/*.jar
+ for JAR in ${INSTALL_ROOT}/lib/*.jar
do
CLASSPATH=${CLASSPATH}:${JAR}
done
+ if [ "${INSTANCE_ROOT}" != "${INSTANCE_ROOT}" ]
+ then
+ for JAR in ${INSTANCE_ROOT}/lib/*.jar
+ do
+ CLASSPATH=${CLASSPATH}:${JAR}
+ done
+ fi
export CLASSPATH
}
-if test "${INSTANCE_ROOT}" = ""
+if test "${INSTALL_ROOT}" = ""
then
# Capture the current working directory so that we can change to it later.
# Then capture the location of this script and the Directory Server instance
@@ -162,7 +169,15 @@
cd "`dirname "${0}"`"
cd ..
- INSTANCE_ROOT=`pwd`
+ INSTALL_ROOT=`pwd`
+ if cat ${INSTALL_ROOT}/instance.loc | grep '^/' > /dev/null
+ then
+ INSTANCE_ROOT=`cat ${INSTALL_ROOT}/instance.loc`
+ export INSTANCE_ROOT
+ else
+ INSTANCE_ROOT=${INSTALL_ROOT}/`cat ${INSTALL_ROOT}/instance.loc`
+ export INSTANCE_ROOT
+ fi
cd "${WORKING_DIR}"
fi
--
Gitblit v1.10.0