From bb488900e6a4b3c695818f9154302973437d8e2b Mon Sep 17 00:00:00 2001
From: Ludovic Poitou <ludovic.poitou@forgerock.com>
Date: Tue, 25 Jun 2013 14:14:13 +0000
Subject: [PATCH] Partial fix to OPENDJ-1012, CR-1912. Adjust SVR4 layout according to the changes done for Linux packages.

---
 opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/util/Utils.java |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 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 1efbf14..8dfd4d8 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
@@ -77,6 +77,7 @@
 import org.opends.quicksetup.installer.SuffixesToReplicateOptions;
 import org.opends.quicksetup.ui.UIFactory;
 import org.opends.server.util.SetupUtils;
+import org.opends.server.util.StaticUtils;
 
 
 /**
@@ -1151,12 +1152,13 @@
   public static String getInstancePathFromInstallPath(String installPath)
   {
     String instancePathFileName = Installation.INSTANCE_LOCATION_PATH;
-    File configureScriptPath = new File(installPath + File.separator +
-      Installation.UNIX_CONFIGURE_FILE_NAME);
+    File _svcScriptPathName = new File(installPath + File.separator +
+      Installation.LIBRARIES_PATH_RELATIVE + File.separator +
+      "_svc-opendj.sh");
 
-    // look for /etc/opt/opends/instance.loc
+    // look for /etc/opt/opendj/instance.loc
     File f = new File(instancePathFileName);
-    if (!configureScriptPath.exists() || !f.exists()) {
+    if (!_svcScriptPathName.exists() || !f.exists()) {
       // look for <installPath>/instance.loc
       instancePathFileName = installPath + File.separator +
               Installation.INSTANCE_LOCATION_PATH_RELATIVE;
@@ -1199,10 +1201,7 @@
     }
     finally
     {
-      try
-      {
-        reader.close();
-      } catch (Exception e) { /* do nothing */}
+      StaticUtils.close(reader);
     }
   }
 

--
Gitblit v1.10.0