From e06809cd1b093bb8d40cfb1b843be3f4bae8404b Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Wed, 23 Aug 2006 16:44:33 +0000
Subject: [PATCH] Update the OpenDS setup process to add a "Please wait while the server initializes...." message at the beginning of the process which can make any delays introduced by the initial configuration and schema processing more palatable to the end user.

---
 opendj-sdk/opends/resource/setup.sh |   27 ++++++++++++++++++++++-----
 1 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/opendj-sdk/opends/resource/setup.sh b/opendj-sdk/opends/resource/setup.sh
index b478561..c058c76 100755
--- a/opendj-sdk/opends/resource/setup.sh
+++ b/opendj-sdk/opends/resource/setup.sh
@@ -69,12 +69,29 @@
 
 
 # Determine whether the detected Java environment is acceptable for use.
-${JAVA_BIN} ${JAVA_ARGS} org.opends.server.tools.InstallDS -t
-if test $? -ne 0
+if test -z "${JAVA_ARGS}"
 then
-  echo "ERROR:  The detected Java version could not be used.  Please set "
-  echo "        JAVA_HOME to the root of a Java 5.0 installation."
-  exit 1
+  ${JAVA_BIN} -client org.opends.server.tools.InstallDS -t 2> /dev/null
+  if test $? -eq 0
+  then
+    JAVA_ARGS="-client"
+  else
+    ${JAVA_BIN} org.opends.server.tools.InstallDS -t 2> /dev/null
+    if test $? -ne 0
+    then
+      echo "ERROR:  The detected Java version could not be used.  Please set "
+      echo "        JAVA_HOME to the root of a Java 5.0 installation."
+      exit 1
+    fi
+  fi
+else
+  ${JAVA_BIN} ${JAVA_ARGS} org.opends.server.tools.InstallDS -t 2> /dev/null
+  if test $? -ne 0
+  then
+    echo "ERROR:  The detected Java version could not be used.  Please set "
+    echo "        JAVA_HOME to the root of a Java 5.0 installation."
+    exit 1
+  fi
 fi
 
 

--
Gitblit v1.10.0