From d2ad6e497910bbe2ac2966f30551bd26f19c3513 Mon Sep 17 00:00:00 2001
From: chebrard <chebrard@localhost>
Date: Wed, 29 Oct 2008 10:39:44 +0000
Subject: [PATCH] Fix 3534: Provide native Solaris packages (fix also 3533: upgrade fails starting server adding entry ds-cfg-key-id)
---
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/util/Utils.java | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/util/Utils.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/util/Utils.java
index 8f007fc..dfea9b8 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/util/Utils.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/util/Utils.java
@@ -1174,13 +1174,20 @@
*/
public static String getInstancePathFromClasspath(String installPath)
{
- String instancePathFileName = installPath + File.separator + "instance.loc";
+ String instancePathFileName = Installation.INSTANCE_LOCATION_PATH;
+ File configureScriptPath = new File(installPath + File.separator +
+ Installation.UNIX_CONFIGURE_FILE_NAME);
- // look for <installPath>/instance.loc
+ // look for /etc/opt/opends/instance.loc
File f = new File(instancePathFileName);
- if (! f.exists())
- {
- return installPath;
+ if (!configureScriptPath.exists() || !f.exists()) {
+ // look for <installPath>/instance.loc
+ instancePathFileName = installPath + File.separator +
+ Installation.INSTANCE_LOCATION_PATH_RELATIVE;
+ f = new File(instancePathFileName);
+ if (!f.exists()) {
+ return installPath;
+ }
}
BufferedReader reader;
--
Gitblit v1.10.0