From f8694ed7365096addbb23f82e0bf492fa87d2964 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Fri, 01 Sep 2006 21:30:06 +0000
Subject: [PATCH] Make some minor changes to the server that will aid in setting up the test environment.  The following changes are included:

---
 opendj-sdk/opends/src/server/org/opends/server/config/ConfigFileHandler.java |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/opendj-sdk/opends/src/server/org/opends/server/config/ConfigFileHandler.java b/opendj-sdk/opends/src/server/org/opends/server/config/ConfigFileHandler.java
index c937040..33bea8b 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/config/ConfigFileHandler.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/config/ConfigFileHandler.java
@@ -500,9 +500,15 @@
 
 
     // Determine the appropriate server root for the Directory Server.  First,
-    // do this by looking at an environment variable.  If that isn't specified,
-    // then try to figure it out from the location of the configuration file.
-    String rootDirStr = System.getenv(ENV_VAR_INSTANCE_ROOT);
+    // do this by looking for a Java property.  If that isn't specified, then
+    // look for an environment variable, and if all else fails then try to
+    // figure it out from the location of the configuration file.
+    String rootDirStr = System.getProperty(PROPERTY_SERVER_ROOT);
+    if (rootDirStr == null)
+    {
+      rootDirStr = System.getenv(ENV_VAR_INSTANCE_ROOT);
+    }
+
     if (rootDirStr != null)
     {
       try

--
Gitblit v1.10.0