From b28b8ac61c82094cd4ff34e5d25c4fb0d20b6f62 Mon Sep 17 00:00:00 2001
From: Violette Roche-Montane <violette.roche-montane@forgerock.com>
Date: Wed, 30 Apr 2014 12:40:05 +0000
Subject: [PATCH] Checkpoint for OPENDJ-1343 Migrate dsconfig - Removed System.getProperty("user.dir") from the initialization of the configuration framework and replaced it with the System.getenv(["INSTALL_ROOT"]["INSTANCE_ROOT"]).
---
opendj-config/src/main/java/org/forgerock/opendj/config/ConfigurationFramework.java | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/ConfigurationFramework.java b/opendj-config/src/main/java/org/forgerock/opendj/config/ConfigurationFramework.java
index 596e331..f31216b 100644
--- a/opendj-config/src/main/java/org/forgerock/opendj/config/ConfigurationFramework.java
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/ConfigurationFramework.java
@@ -320,8 +320,13 @@
if (loader != null) {
throw new IllegalStateException("configuration framework already initialized.");
}
- this.installPath = installPath == null ? System.getProperty("user.dir") : installPath;
- this.instancePath = instancePath == null ? this.installPath : instancePath;
+ this.installPath = installPath == null ? System.getenv("INSTALL_ROOT") : installPath;
+ if (instancePath != null) {
+ this.instancePath = instancePath;
+ } else {
+ this.instancePath = System.getenv("INSTANCE_ROOT") != null ? System.getenv("INSTANCE_ROOT")
+ : this.installPath;
+ }
this.parent = parent;
initialize0();
return this;
--
Gitblit v1.10.0