From 3dfb061cbafd3a97c9359f739942924a8ee525f1 Mon Sep 17 00:00:00 2001
From: Ludovic Poitou <ludovic.poitou@forgerock.com>
Date: Wed, 02 Nov 2011 12:07:15 +0000
Subject: [PATCH] Fix for OPENDJ-222 : Renamed environment variables to OPENDJ_... Updated scripts so that if OPENDJ_JAVA_HOME and OPENDJ_JAVA_ARGS are not defined, we look at the legacy OPENDS_... ones.

---
 opends/resource/bin/stop-ds |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/opends/resource/bin/stop-ds b/opends/resource/bin/stop-ds
index bcb3151..e450421 100755
--- a/opends/resource/bin/stop-ds
+++ b/opends/resource/bin/stop-ds
@@ -51,9 +51,9 @@
 cd "${WORKING_DIR}"
 
 # We keep this values to reset the environment before calling start-ds.
-ORIGINAL_JAVA_ARGS=${OPENDS_JAVA_ARGS}
-ORIGINAL_JAVA_HOME=${OPENDS_JAVA_HOME}
-ORIGINAL_JAVA_BIN=${OPENDS_JAVA_BIN}
+ORIGINAL_JAVA_ARGS=${OPENDJ_JAVA_ARGS}
+ORIGINAL_JAVA_HOME=${OPENDJ_JAVA_HOME}
+ORIGINAL_JAVA_BIN=${OPENDJ_JAVA_BIN}
 
 
 # Specify the script name so that we can use the specified java properties.
@@ -99,7 +99,7 @@
 fi
 
 
-"${OPENDS_JAVA_BIN}" ${OPENDS_JAVA_ARGS} ${SCRIPT_NAME_ARG} \
+"${OPENDJ_JAVA_BIN}" ${OPENDJ_JAVA_ARGS} ${SCRIPT_NAME_ARG} \
   org.opends.server.tools.StopDS --checkStoppability "${@}"
 EC=${?}
 
@@ -165,7 +165,7 @@
     EXIT_CODE=${?}
     if test ${EXIT_CODE} -eq 0
     then
-      "${OPENDS_JAVA_BIN}" -client org.opends.server.tools.WaitForFileDelete \
+      "${OPENDJ_JAVA_BIN}" -client org.opends.server.tools.WaitForFileDelete \
         --targetFile "${INSTANCE_ROOT}/logs/server.pid" \
         --logFile "${INSTANCE_ROOT}/logs/errors"
       EXIT_CODE=${?}
@@ -200,9 +200,9 @@
 # Set the original values that the user had on the environment in order to be
 # sure that the start-ds script works with the proper arguments (in particular
 # if the user specified not to overwrite the environment).
-    OPENDS_JAVA_ARGS=${ORIGINAL_JAVA_ARGS}
-    OPENDS_JAVA_HOME=${ORIGINAL_JAVA_HOME}
-    OPENDS_JAVA_BIN=${ORIGINAL_JAVA_BIN}
+    OPENDJ_JAVA_ARGS=${ORIGINAL_JAVA_ARGS}
+    OPENDJ_JAVA_HOME=${ORIGINAL_JAVA_HOME}
+    OPENDJ_JAVA_BIN=${ORIGINAL_JAVA_BIN}
     if test ${QUIET_MODE} -eq 0
     then
       "${INSTALL_ROOT}/bin/start-ds" --quiet
@@ -226,5 +226,5 @@
 fi
 
 # If we've gotten here, then we should try to stop the server over LDAP.
-"${OPENDS_JAVA_BIN}" ${OPENDS_JAVA_ARGS} ${SCRIPT_NAME_ARG} \
+"${OPENDJ_JAVA_BIN}" ${OPENDJ_JAVA_ARGS} ${SCRIPT_NAME_ARG} \
   org.opends.server.tools.StopDS "${@}"

--
Gitblit v1.10.0