From ad045ba9e4d87449a7d1af1f4ba3db5e1951c6fa Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Wed, 19 Sep 2007 14:40:07 +0000
Subject: [PATCH] After some discussions it has been decided to merge the setup and uninstall commands so that we have the behavior that we had before.  So with this changes, in order to work in CLI mode the option --cli must be specified. 

---
 opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/Installer.java               |    4 
 opendj-sdk/opends/resource/setup                                                              |    2 
 opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/Launcher.java                          |    4 
 opendj-sdk/opends/build.xml                                                                   |   10 -
 opendj-sdk/opends/resource/uninstall.bat                                                      |   10 +
 opendj-sdk/opends/src/guitools/org/opends/guitools/uninstaller/UninstallLauncher.java         |    7 -
 opendj-sdk/opends/src/server/org/opends/server/tools/ToolConstants.java                       |    5 
 opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/SetupLauncher.java           |   60 ++++------
 opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/util/Utils.java                        |    4 
 opendj-sdk/opends/src/server/org/opends/server/tools/InstallDSArgumentParser.java             |   10 +
 opendj-sdk/opends/tests/functional-tests/shared/functions/dsadm.xml                           |    1 
 opendj-sdk/opends/src/guitools/org/opends/guitools/uninstaller/UninstallerArgumentParser.java |    7 +
 opendj-sdk/opends/src/messages/messages/admin_tool.properties                                 |    5 
 opendj-sdk/opends/resource/setup.bat                                                          |   10 +
 /dev/null                                                                                     |  178 -----------------------------
 opendj-sdk/opends/src/messages/messages/tools.properties                                      |    4 
 opendj-sdk/opends/resource/uninstall                                                          |    2 
 opendj-sdk/opends/src/messages/messages/quicksetup.properties                                 |    5 
 opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/Installation.java                      |   21 ---
 opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/quicksetup/TestUtilities.java |    3 
 20 files changed, 86 insertions(+), 266 deletions(-)

diff --git a/opendj-sdk/opends/build.xml b/opendj-sdk/opends/build.xml
index f105c43..5bda04f 100644
--- a/opendj-sdk/opends/build.xml
+++ b/opendj-sdk/opends/build.xml
@@ -863,15 +863,13 @@
       <fileset file="${resource.dir}/README" />
     </copy>
 
-    <fixcrlf srcDir="${resource.dir}" destDir="${pdir}" includes="setup,setup-gui,uninstall,uninstall-gui,upgrade"
+    <fixcrlf srcDir="${resource.dir}" destDir="${pdir}" includes="setup,uninstall,upgrade"
          eol="lf" />
-    <fixcrlf srcDir="${resource.dir}" destDir="${pdir}" includes="setup.bat,setup-gui.bat,uninstall.bat,uninstall-gui.bat,upgrade.bat"
+    <fixcrlf srcDir="${resource.dir}" destDir="${pdir}" includes="setup.bat,uninstall.bat,upgrade.bat"
          eol="crlf" />
 
     <chmod file="${pdir}/setup" perm="755" />
-  	<chmod file="${pdir}/setup-gui" perm="755" />
     <chmod file="${pdir}/uninstall" perm="755" />
-  	<chmod file="${pdir}/uninstall-gui" perm="755" />
     <chmod file="${pdir}/upgrade" perm="755" />
     <chmod perm="755">
       <fileset dir="${pdir}/bin">
@@ -889,7 +887,7 @@
        description="Package the Directory Server for distribution.">
     <zip destfile="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}.zip">
       <zipfileset dir="${package.dir}" includes="${SHORT_NAME}-${VERSION_NUMBER_STRING}/**/*"
-           excludes="${SHORT_NAME}-${VERSION_NUMBER_STRING}/bin/*,${SHORT_NAME}-${VERSION_NUMBER_STRING}/lib/_client-script.sh,${SHORT_NAME}-${VERSION_NUMBER_STRING}/lib/_server-script.sh,${SHORT_NAME}-${VERSION_NUMBER_STRING}/setup,${SHORT_NAME}-${VERSION_NUMBER_STRING}/setup-gui,${SHORT_NAME}-${VERSION_NUMBER_STRING}/uninstall,${SHORT_NAME}-${VERSION_NUMBER_STRING}/uninstall-gui,${SHORT_NAME}-${VERSION_NUMBER_STRING}/upgrade"
+           excludes="${SHORT_NAME}-${VERSION_NUMBER_STRING}/bin/*,${SHORT_NAME}-${VERSION_NUMBER_STRING}/lib/_client-script.sh,${SHORT_NAME}-${VERSION_NUMBER_STRING}/lib/_server-script.sh,${SHORT_NAME}-${VERSION_NUMBER_STRING}/setup,${SHORT_NAME}-${VERSION_NUMBER_STRING}/uninstall,${SHORT_NAME}-${VERSION_NUMBER_STRING}/upgrade"
            filemode="644" dirmode="755" />
       <zipfileset dir="${package.dir}"
            includes="${SHORT_NAME}-${VERSION_NUMBER_STRING}/lib/_client-script.sh,${SHORT_NAME}-${VERSION_NUMBER_STRING}/lib/_server-script.sh"
@@ -899,7 +897,7 @@
            filemode="755" dirmode="755" />
       <zipfileset dir="${package.dir}" includes="${SHORT_NAME}-${VERSION_NUMBER_STRING}/bin/README_WINDOWS.txt"
            filemode="644" dirmode="755" />
-      <zipfileset dir="${package.dir}" includes="${SHORT_NAME}-${VERSION_NUMBER_STRING}/setup,${SHORT_NAME}-${VERSION_NUMBER_STRING}/setup-gui,${SHORT_NAME}-${VERSION_NUMBER_STRING}/uninstall,${SHORT_NAME}-${VERSION_NUMBER_STRING}/uninstall-gui,${SHORT_NAME}-${VERSION_NUMBER_STRING}/upgrade"
+      <zipfileset dir="${package.dir}" includes="${SHORT_NAME}-${VERSION_NUMBER_STRING}/setup,${SHORT_NAME}-${VERSION_NUMBER_STRING}/uninstall,${SHORT_NAME}-${VERSION_NUMBER_STRING}/upgrade"
            filemode="755" dirmode="755" />
     </zip>
     <property name="package.built" value="true"/>
diff --git a/opendj-sdk/opends/resource/setup b/opendj-sdk/opends/resource/setup
index df90093..2210297 100755
--- a/opendj-sdk/opends/resource/setup
+++ b/opendj-sdk/opends/resource/setup
@@ -118,7 +118,7 @@
 
 
 # Launch the setup process.
-"${JAVA_BIN}" -Dorg.opends.server.scriptName=setup org.opends.server.tools.InstallDS "${@}"
+"${JAVA_BIN}" -Dorg.opends.server.scriptName=setup org.opends.quicksetup.installer.SetupLauncher "${@}"
 
 # return part
 RETURN_CODE=$?
diff --git a/opendj-sdk/opends/resource/setup-gui b/opendj-sdk/opends/resource/setup-gui
deleted file mode 100644
index b8963ba..0000000
--- a/opendj-sdk/opends/resource/setup-gui
+++ /dev/null
@@ -1,131 +0,0 @@
-#!/bin/sh
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at
-# trunk/opends/resource/legal-notices/OpenDS.LICENSE
-# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at
-# trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
-# add the following below this CDDL HEADER, with the fields enclosed
-# by brackets "[]" replaced with your own identifying information:
-#      Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-#      Portions Copyright 2006-2007 Sun Microsystems, Inc.
-
-
-# See if JAVA_HOME is set.  If not, then see if there is a java executable in
-# the path and try to figure it out.
-if test -z "${JAVA_BIN}"
-then
-  if test -z "${JAVA_HOME}"
-  then
-    if test -f "${INSTANCE_ROOT}/lib/set-java-home"
-    then
-      . "${INSTANCE_ROOT}/bin/set-java-home"
-      JAVA_BIN="${JAVA_HOME}/bin/java"
-      export JAVA_BIN
-    else
-      JAVA_BIN=`which java 2> /dev/null`
-      if test ${?} -eq 0
-      then
-        export JAVA_BIN
-      else
-        echo "Please set JAVA_HOME to the root of a Java 5  (or later) installation."
-        exit 1
-      fi
-    fi
-  else
-    JAVA_BIN="${JAVA_HOME}/bin/java"
-    export JAVA_BIN
-  fi
-fi
-
-
-# Explicitly set the PATH, LD_LIBRARY_PATH, LD_PRELOAD, and other important
-# system environment variables for security and compatibility reasons.
-PATH=/bin:/usr/bin
-LD_LIBRARY_PATH=
-LD_LIBRARY_PATH_32=
-LD_LIBRARY_PATH_64=
-LD_PRELOAD=
-LD_PRELOAD_32=
-LD_PRELOAD_64=
-export PATH LD_LIBRARY_PATH LD_LIBRARY_PATH_32 LD_LIBRARY_PATH_64 \
-       LD_PRELOAD LD_PRELOAD_32 LD_PRELOAD_34
-
-
-# Capture the current working directory so that we can change to it later.
-# Then capture the location of this script and the Directory Server instance
-# root so that we can use them to create appropriate paths.
-WORKING_DIR=`pwd`
-
-cd `dirname "${0}"`
-SCRIPT_DIR=`pwd`
-
-INSTANCE_ROOT=${SCRIPT_DIR}
-export INSTANCE_ROOT
-
-cd "${WORKING_DIR}"
-
-
-# Configure the appropriate CLASSPATH.
-CLASSPATH=${INSTANCE_ROOT}/classes
-for JAR in ${INSTANCE_ROOT}/lib/*.jar
-do
-  CLASSPATH=${CLASSPATH}:${JAR}
-done
-export CLASSPATH
-
-
-# Determine whether the detected Java environment is acceptable for use.
-if test -z "${JAVA_ARGS}"
-then
-  "${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 (or later) 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 (or later) installation."
-    exit 1
-  fi
-fi
-
-
-# Launch the setup process.
-"${JAVA_BIN}" org.opends.quicksetup.installer.SetupGuiLauncher "${@}"
-
-# return part
-RETURN_CODE=$?
-if test ${RETURN_CODE} -eq 50
-then
-  # Version info was on requested
-  exit 0
-else
-  exit ${RETURN_CODE}
-fi
\ No newline at end of file
diff --git a/opendj-sdk/opends/resource/setup-gui.bat b/opendj-sdk/opends/resource/setup-gui.bat
deleted file mode 100644
index 2fb7df6..0000000
--- a/opendj-sdk/opends/resource/setup-gui.bat
+++ /dev/null
@@ -1,89 +0,0 @@
-
-@echo off
-rem CDDL HEADER START
-rem
-rem The contents of this file are subject to the terms of the
-rem Common Development and Distribution License, Version 1.0 only
-rem (the "License").  You may not use this file except in compliance
-rem with the License.
-rem
-rem You can obtain a copy of the license at
-rem trunk/opends/resource/legal-notices/OpenDS.LICENSE
-rem or https://OpenDS.dev.java.net/OpenDS.LICENSE.
-rem See the License for the specific language governing permissions
-rem and limitations under the License.
-rem
-rem When distributing Covered Code, include this CDDL HEADER in each
-rem file and include the License file at
-rem trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
-rem add the following below this CDDL HEADER, with the fields enclosed
-rem by brackets "[]" replaced with your own identifying information:
-rem      Portions Copyright [yyyy] [name of copyright owner]
-rem
-rem CDDL HEADER END
-rem
-rem
-rem      Portions Copyright 2007 Sun Microsystems, Inc.
-
-setlocal
-for %%i in (%~sf0) do set DIR_HOME=%%~dPsi.
-
-set INSTANCE_ROOT=%DIR_HOME%
-
-:checkJavaBin
-if "%JAVA_BIN%" == "" goto noJavaBin
-goto setClassPath
-
-:noJavaBin
-if "%JAVA_HOME%" == "" goto noJavaHome
-if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
-set JAVA_BIN=%JAVA_HOME%\bin\java.exe
-goto setClassPath
-
-:noJavaHome
-if not exist "%DIR_HOME%\lib\set-java-home.bat" goto noSetJavaHome
-call "%DIR_HOME%\lib\set-java-home.bat"
-set JAVA_BIN=%JAVA_HOME%\bin\java.exe
-goto setClassPath
-
-:noSetJavaHome
-echo Error: JAVA_HOME environment variable is not set.
-echo        Please set it to a valid Java 5 (or later) installation.
-pause
-goto end
-
-:noValidJavaHome
-echo ERROR:  The detected Java version could not be used.  Please set 
-echo         JAVA_HOME to to a valid Java 5 (or later) installation.
-pause
-goto end
-
-:setClassPath
-FOR %%x in ("%DIR_HOME%\lib\*.jar") DO call "%DIR_HOME%\lib\setcp.bat" %%x
-set CLASSPATH=%DIR_HOME%\classes;%CLASSPATH%
-
-set PATH=%SystemRoot%
-
-rem Test that the provided JDK is 1.5 compatible.
-"%JAVA_BIN%" org.opends.server.tools.InstallDS -t > NUL 2>&1
-if not %errorlevel% == 0 goto noValidJavaHome
-
-if "%~1" == "" goto callLaunch
-goto callJava
-
-:callLaunch
-"%DIR_HOME%\lib\winlauncher.exe" launch "%JAVA_BIN%" %JAVA_ARGS% org.opends.quicksetup.installer.SetupGuiLauncher
-goto end
-
-:callJava
-"%JAVA_BIN%" %JAVA_ARGS% org.opends.quicksetup.installer.SetupGuiLauncher %*
-
-rem return part
-if %errorlevel% == 50 goto version
-goto end
-
-:version
-rem version information was requested. Return code should be 0.
-exit /B 0
-
-:end
diff --git a/opendj-sdk/opends/resource/setup.bat b/opendj-sdk/opends/resource/setup.bat
index 53c601b..27a6ee5 100644
--- a/opendj-sdk/opends/resource/setup.bat
+++ b/opendj-sdk/opends/resource/setup.bat
@@ -84,7 +84,15 @@
 "%JAVA_BIN%" org.opends.server.tools.InstallDS -t > NUL 2>&1
 if not %errorlevel% == 0 goto noValidJavaHome
 
-"%JAVA_BIN%" %JAVA_ARGS% -Dorg.opends.server.scriptName=setup.bat org.opends.server.tools.InstallDS %*
+if "%~1" == "" goto callLaunch
+goto callJava
+
+:callLaunch
+"%DIR_HOME%\lib\winlauncher.exe" launch "%JAVA_BIN%" %JAVA_ARGS% org.opends.quicksetup.installer.SetupLauncher
+goto end
+
+:callJava
+"%JAVA_BIN%" %JAVA_ARGS% org.opends.quicksetup.installer.SetupLauncher %*
 
 rem return part
 if %errorlevel% == 50 goto version
diff --git a/opendj-sdk/opends/resource/uninstall b/opendj-sdk/opends/resource/uninstall
index c8f0744..4ad1205 100644
--- a/opendj-sdk/opends/resource/uninstall
+++ b/opendj-sdk/opends/resource/uninstall
@@ -26,7 +26,7 @@
 #      Portions Copyright 2006-2007 Sun Microsystems, Inc.
 
 
-# This script may be used to display the status panel.
+# This script may be used to uninstall the server.
 OPENDS_INVOKE_CLASS="org.opends.guitools.uninstaller.UninstallLauncher"
 export OPENDS_INVOKE_CLASS
 
diff --git a/opendj-sdk/opends/resource/uninstall-gui b/opendj-sdk/opends/resource/uninstall-gui
deleted file mode 100644
index 679ad12..0000000
--- a/opendj-sdk/opends/resource/uninstall-gui
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/sh
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at
-# trunk/opends/resource/legal-notices/OpenDS.LICENSE
-# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at
-# trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
-# add the following below this CDDL HEADER, with the fields enclosed
-# by brackets "[]" replaced with your own identifying information:
-#      Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-#      Portions Copyright 2006-2007 Sun Microsystems, Inc.
-
-
-# This script may be used to uninstall the server.
-OPENDS_INVOKE_CLASS="org.opends.guitools.uninstaller.UninstallGuiLauncher"
-export OPENDS_INVOKE_CLASS
-
-SCRIPT_NAME_ARG="-Dorg.opends.server.scriptName=uninstall-gui"
-export SCRIPT_NAME_ARG
-
-SCRIPT_DIR=`dirname "${0}"`
-"${SCRIPT_DIR}/lib/_client-script.sh" "${@}"
\ No newline at end of file
diff --git a/opendj-sdk/opends/resource/uninstall-gui.bat b/opendj-sdk/opends/resource/uninstall-gui.bat
deleted file mode 100644
index 1961497..0000000
--- a/opendj-sdk/opends/resource/uninstall-gui.bat
+++ /dev/null
@@ -1,90 +0,0 @@
-
-@echo off
-rem CDDL HEADER START
-rem
-rem The contents of this file are subject to the terms of the
-rem Common Development and Distribution License, Version 1.0 only
-rem (the "License").  You may not use this file except in compliance
-rem with the License.
-rem
-rem You can obtain a copy of the license at
-rem trunk/opends/resource/legal-notices/OpenDS.LICENSE
-rem or https://OpenDS.dev.java.net/OpenDS.LICENSE.
-rem See the License for the specific language governing permissions
-rem and limitations under the License.
-rem
-rem When distributing Covered Code, include this CDDL HEADER in each
-rem file and include the License file at
-rem trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
-rem add the following below this CDDL HEADER, with the fields enclosed
-rem by brackets "[]" replaced with your own identifying information:
-rem      Portions Copyright [yyyy] [name of copyright owner]
-rem
-rem CDDL HEADER END
-rem
-rem
-rem      Portions Copyright 2007 Sun Microsystems, Inc.
-
-setlocal
-for %%i in (%~sf0) do set DIR_HOME=%%~dPsi.
-
-set INSTANCE_ROOT=%DIR_HOME%
-
-:checkJavaBin
-if "%JAVA_BIN%" == "" goto noJavaBin
-goto setClassPath
-
-:noJavaBin
-if "%JAVA_HOME%" == "" goto noJavaHome
-if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
-set JAVA_BIN=%JAVA_HOME%\bin\java.exe
-goto setClassPath
-
-:noJavaHome
-if not exist "%DIR_HOME%\lib\set-java-home.bat" goto noSetJavaHome
-call "%DIR_HOME%\lib\set-java-home.bat"
-set JAVA_BIN=%JAVA_HOME%\bin\java.exe
-goto setClassPath
-
-:noSetJavaHome
-echo Error: JAVA_HOME environment variable is not set.
-echo        Please set it to a valid Java 5 (or later) installation.
-pause
-goto end
-
-:noValidJavaHome
-echo ERROR:  The detected Java version could not be used.  Please set 
-echo         JAVA_HOME to to a valid Java 5 (or later) installation.
-pause
-goto end
-
-:setClassPath
-FOR %%x in ("%DIR_HOME%\lib\*.jar") DO call "%DIR_HOME%\lib\setcp.bat" %%x
-set CLASSPATH=%DIR_HOME%\classes;%CLASSPATH%
-
-set PATH=%SystemRoot%
-
-rem Test that the provided JDK is 1.5 compatible.
-"%JAVA_BIN%" org.opends.server.tools.InstallDS -t > NUL 2>&1
-if not %errorlevel% == 0 goto noValidJavaHome
-
-if "%~1" == "" goto callLaunch
-goto callJava
-
-:callLaunch
-"%DIR_HOME%\lib\winlauncher.exe" launch "%JAVA_BIN%" %JAVA_ARGS% org.opends.guitools.uninstaller.UninstallGuiLauncher
-goto end
-
-:callJava
-set SCRIPT_NAME_ARG="-Dorg.opends.server.scriptName=uninstall-gui"
-"%JAVA_BIN%" %JAVA_ARGS% org.opends.guitools.uninstaller.UninstallGuiLauncher %*
-
-rem return part
-if %errorlevel% == 50 goto version
-goto end
-
-:version
-rem version information was requested. Return code should be 0.
-exit /B 0
-
-:end
diff --git a/opendj-sdk/opends/resource/uninstall.bat b/opendj-sdk/opends/resource/uninstall.bat
index 6bd7008..c1c53e5 100644
--- a/opendj-sdk/opends/resource/uninstall.bat
+++ b/opendj-sdk/opends/resource/uninstall.bat
@@ -68,7 +68,15 @@
 "%JAVA_BIN%" org.opends.server.tools.InstallDS -t > NUL 2>&1
 if not %errorlevel% == 0 goto noValidJavaHome
 
-set SCRIPT_NAME_ARG="-Dorg.opends.server.scriptName=uninstall.bat"
+if "%~1" == "" goto callLaunch
+goto callJava
+
+:callLaunch
+"%DIR_HOME%\lib\winlauncher.exe" launch "%JAVA_BIN%" %JAVA_ARGS% org.opends.guitools.uninstaller.UninstallLauncher
+goto end
+
+:callJava
+set SCRIPT_NAME_ARG="-Dorg.opends.server.scriptName=uninstall"
 "%JAVA_BIN%" %JAVA_ARGS% org.opends.guitools.uninstaller.UninstallLauncher %*
 
 rem return part
diff --git a/opendj-sdk/opends/src/guitools/org/opends/guitools/uninstaller/UninstallGuiLauncher.java b/opendj-sdk/opends/src/guitools/org/opends/guitools/uninstaller/UninstallGuiLauncher.java
deleted file mode 100644
index 5d3fe73..0000000
--- a/opendj-sdk/opends/src/guitools/org/opends/guitools/uninstaller/UninstallGuiLauncher.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE
- * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
- * add the following below this CDDL HEADER, with the fields enclosed
- * by brackets "[]" replaced with your own identifying information:
- *      Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- *      Portions Copyright 2007 Sun Microsystems, Inc.
- */
-
-package org.opends.guitools.uninstaller;
-
-import static org.opends.messages.ToolMessages.INFO_DESCRIPTION_SHOWUSAGE;
-import static org.opends.server.tools.ToolConstants.OPTION_LONG_HELP;
-import static org.opends.server.tools.ToolConstants.OPTION_SHORT_HELP;
-
-import java.io.File;
-import java.util.logging.Logger;
-
-import org.opends.quicksetup.ReturnCode;
-import org.opends.quicksetup.Installation;
-import org.opends.quicksetup.QuickSetupLog;
-import org.opends.quicksetup.util.Utils;
-import org.opends.messages.AdminToolMessages;
-import org.opends.messages.ToolMessages;
-import org.opends.server.util.ServerConstants;
-import org.opends.server.util.args.ArgumentException;
-import org.opends.server.util.args.ArgumentParser;
-import org.opends.server.util.args.BooleanArgument;
-
-/**
- * This class is called by the uninstall command lines to launch the uninstall
- * of the Directory Server. It just checks the command line arguments and the
- * environment and determines whether the graphical or the command line
- * based uninstall much be launched.
- */
-public class UninstallGuiLauncher extends UninstallLauncher {
-
-  /** Prefix for log files. */
-  static public final String LOG_FILE_PREFIX = "opends-uninstall-gui-";
-
-  /** Suffix for log files. */
-  static public final String LOG_FILE_SUFFIX = ".log";
-
-  static private final Logger LOG =
-          Logger.getLogger(UninstallGuiLauncher.class.getName());
-
-  /**
-   * The main method which is called by the uninstall command lines.
-   *
-   * @param args the arguments passed by the command lines.  In the case
-   * we want to launch the cli setup they are basically the arguments that we
-   * will pass to the org.opends.server.tools.InstallDS class.
-   */
-  public static void main(String[] args) {
-    try {
-      QuickSetupLog.initLogFileHandler(
-              File.createTempFile(LOG_FILE_PREFIX, LOG_FILE_SUFFIX),
-              "org.opends.guitools.uninstaller");
-
-    } catch (Throwable t) {
-      System.err.println("Unable to initialize log");
-      t.printStackTrace();
-    }
-    new UninstallGuiLauncher(args).launch();
-  }
-
-  private ArgumentParser argParser;
-
-  /**
-   * Creates a launcher.
-   *
-   * @param args the arguments passed by the command lines.
-   */
-  public UninstallGuiLauncher(String[] args) {
-    super(args);
-
-    String scriptName;
-    if (Utils.isWindows()) {
-      scriptName = Installation.WINDOWS_UNINSTALL_GUI_FILE_NAME;
-    } else {
-      scriptName = Installation.UNIX_UNINSTALL_GUI_FILE_NAME;
-    }
-    System.setProperty(ServerConstants.PROPERTY_SCRIPT_NAME, scriptName);
-  }
-
-  /**
-   * Initialize the contents of the argument parser.
-   */
-  protected void initializeParser()
-  {
-    argParser = new ArgumentParser(getClass().getName(),
-        AdminToolMessages.INFO_UNINSTALL_LAUNCHER_USAGE_DESCRIPTION.get(),
-        false);
-    try
-    {
-      BooleanArgument showUsageArg = new BooleanArgument("showUsage",
-          OPTION_SHORT_HELP,
-          OPTION_LONG_HELP, INFO_DESCRIPTION_SHOWUSAGE.get());
-      argParser.addArgument(showUsageArg);
-      argParser.setUsageArgument(showUsageArg);
-      argParser.parseArguments(args);
-    }
-    catch (ArgumentException ae)
-    {
-      System.err.println(org.opends.server.util.StaticUtils.wrapText(
-          ToolMessages.ERR_CANNOT_INITIALIZE_ARGS.get(ae.getMessage()),
-          Utils.getCommandLineMaxLineWidth()));
-    }
-  }
-
-  /**
-   * {@inheritDoc}
-   */
-  public void launch() {
-    if (shouldPrintVersion())
-    {
-      if (!argParser.usageOrVersionDisplayed())
-      {
-        printVersion();
-      }
-      System.exit(ReturnCode.PRINT_VERSION.getReturnCode());
-    }
-    else if (shouldPrintUsage()) {
-      if (!argParser.usageOrVersionDisplayed())
-      {
-        printUsage(false);
-      }
-      System.exit(ReturnCode.SUCCESSFUL.getReturnCode());
-    } else {
-      willLaunchGui();
-      int exitCode = launchGui(args);
-      if (exitCode != 0) {
-        File logFile = QuickSetupLog.getLogFile();
-        if (logFile != null)
-        {
-          guiLaunchFailed(logFile.toString());
-        }
-        else
-        {
-          guiLaunchFailed(null);
-        }
-        System.exit(exitCode);
-      }
-    }
-  }
-
-  /**
-   * {@inheritDoc}
-   */
-  protected boolean isCli() {
-    return false;
-  }
-
-  /**
-   * {@inheritDoc}
-   */
-  public ArgumentParser getArgumentParser() {
-    return this.argParser;
-  }
-}
\ No newline at end of file
diff --git a/opendj-sdk/opends/src/guitools/org/opends/guitools/uninstaller/UninstallLauncher.java b/opendj-sdk/opends/src/guitools/org/opends/guitools/uninstaller/UninstallLauncher.java
index 3eb6f67..f9e676c 100644
--- a/opendj-sdk/opends/src/guitools/org/opends/guitools/uninstaller/UninstallLauncher.java
+++ b/opendj-sdk/opends/src/guitools/org/opends/guitools/uninstaller/UninstallLauncher.java
@@ -123,13 +123,6 @@
   /**
    * {@inheritDoc}
    */
-  protected boolean isCli() {
-    return true;
-  }
-
-  /**
-   * {@inheritDoc}
-   */
   protected void guiLaunchFailed(String logFilePath) {
     if (logFilePath != null)
     {
diff --git a/opendj-sdk/opends/src/guitools/org/opends/guitools/uninstaller/UninstallerArgumentParser.java b/opendj-sdk/opends/src/guitools/org/opends/guitools/uninstaller/UninstallerArgumentParser.java
index eb0c187..56dec25 100644
--- a/opendj-sdk/opends/src/guitools/org/opends/guitools/uninstaller/UninstallerArgumentParser.java
+++ b/opendj-sdk/opends/src/guitools/org/opends/guitools/uninstaller/UninstallerArgumentParser.java
@@ -53,6 +53,7 @@
  */
 public class UninstallerArgumentParser extends SecureConnectionCliParser
 {
+  private BooleanArgument cliArg;
   private BooleanArgument noPromptArg;
   BooleanArgument forceOnErrorArg;
   private BooleanArgument quietArg;
@@ -103,6 +104,12 @@
   throws ArgumentException
   {
     LinkedHashSet<Argument> args = new LinkedHashSet<Argument>();
+    cliArg = new BooleanArgument(
+        OPTION_LONG_CLI,
+        OPTION_SHORT_CLI,
+        OPTION_LONG_CLI,
+        INFO_UNINSTALLDS_DESCRIPTION_CLI.get());
+    args.add(cliArg);
     removeAllArg = new BooleanArgument(
         "remove-all",
         'a',
diff --git a/opendj-sdk/opends/src/messages/messages/admin_tool.properties b/opendj-sdk/opends/src/messages/messages/admin_tool.properties
index 5f157b8..0a9a88a 100644
--- a/opendj-sdk/opends/src/messages/messages/admin_tool.properties
+++ b/opendj-sdk/opends/src/messages/messages/admin_tool.properties
@@ -338,9 +338,10 @@
 INFO_SUMMARY_UNINSTALL_NOT_STARTED=Starting Uninstallation...
 INFO_UNDEFINED_PROTOCOL_LABEL=-Unknown-
 SEVERE_ERR_UNINSTALL_LAUNCHER_GUI_LAUNCHED_FAILED=%n%nThe graphical Uninstall \
- launch failed.
+ launch failed.%n%nLaunching command line uninstall...
 SEVERE_ERR_UNINSTALL_LAUNCHER_GUI_LAUNCHED_FAILED_DETAILS=%n%nThe graphical \
- Uninstall launch failed.  Check file %s for more details.
+ Uninstall launch failed.  Check file %s for more details.%n%nLaunching \
+ command line uninstall...
 INFO_UNINSTALL_LAUNCHER_LAUNCHING_CLI=Launching command line uninstall...
 INFO_UNINSTALL_LAUNCHER_LAUNCHING_GUI=Launching graphical uninstall...
 INFO_UNINSTALL_LAUNCHER_USAGE_DESCRIPTION=This utility may be used to \
diff --git a/opendj-sdk/opends/src/messages/messages/quicksetup.properties b/opendj-sdk/opends/src/messages/messages/quicksetup.properties
index 14c722d..304cfc7 100644
--- a/opendj-sdk/opends/src/messages/messages/quicksetup.properties
+++ b/opendj-sdk/opends/src/messages/messages/quicksetup.properties
@@ -835,9 +835,10 @@
 INFO_SERVER_SETTINGS_PANEL_TITLE=Server Settings
 INFO_SERVER_SETTINGS_STEP=Server Settings
 INFO_SETUP_LAUNCHER_GUI_LAUNCHED_FAILED=%n%nThe graphical Setup launch \
- failed.
+ failed.%n%nLaunching command line setup...
 INFO_SETUP_LAUNCHER_GUI_LAUNCHED_FAILED_DETAILS=%n%nThe graphical Setup \
- launch failed.  Check file %s for more details.
+ launch failed.  Check file %s for more details.%n%nLaunching command line \
+ setup...
 INFO_SETUP_LAUNCHER_LAUNCHING_GUI=Launching graphical setup...
 INFO_SETUP_LAUNCHER_USAGE_DESCRIPTION=This utility may be used to setup the \
  Directory Server.
diff --git a/opendj-sdk/opends/src/messages/messages/tools.properties b/opendj-sdk/opends/src/messages/messages/tools.properties
index ce886d3..e22ab24 100644
--- a/opendj-sdk/opends/src/messages/messages/tools.properties
+++ b/opendj-sdk/opends/src/messages/messages/tools.properties
@@ -903,8 +903,8 @@
 INFO_INSTALLDS_PROMPT_ROOT_DN_512=What would you like to use as the initial \
  root user DN for the Directory Server?
 SEVERE_ERR_INSTALLDS_NO_ROOT_PASSWORD_513=ERROR:  No password was provided \
- for the initial root user.  When performing a quiet installation, this must \
- be provided using either the %s or the %s argument
+ for the initial root user.  When performing a non-interactive installation, \
+ this must be provided using either the %s or the %s argument
 INFO_INSTALLDS_PROMPT_ROOT_PASSWORD_514=Please provide the password to use \
  for the initial root user:
 INFO_INSTALLDS_PROMPT_CONFIRM_ROOT_PASSWORD_515=Please re-enter the password \
diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/Installation.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/Installation.java
index 5b06e72..6c9a604 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/Installation.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/Installation.java
@@ -139,16 +139,6 @@
   public static final String WINDOWS_SETUP_FILE_NAME = "setup.bat";
 
   /**
-   * The UNIX GUI setup script file name.
-   */
-  public static final String UNIX_SETUP_GUI_FILE_NAME = "setup-gui";
-
-  /**
-   * The Windows GUI setup batch file name.
-   */
-  public static final String WINDOWS_SETUP_GUI_FILE_NAME = "setup-gui.bat";
-
-  /**
    * The UNIX uninstall script file name.
    */
   public static final String UNIX_UNINSTALL_FILE_NAME = "uninstall";
@@ -159,17 +149,6 @@
   public static final String WINDOWS_UNINSTALL_FILE_NAME = "uninstall.bat";
 
   /**
-   * The UNIX uninstall script file name.
-   */
-  public static final String UNIX_UNINSTALL_GUI_FILE_NAME = "uninstall-gui";
-
-  /**
-   * The Windows uninstall batch file name.
-   */
-  public static final String WINDOWS_UNINSTALL_GUI_FILE_NAME =
-    "uninstall-gui.bat";
-
-  /**
    * The UNIX upgrade script file name.
    */
   public static final String UNIX_UPGRADE_FILE_NAME = "upgrade";
diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/Launcher.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/Launcher.java
index f3ad57d..7003761 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/Launcher.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/Launcher.java
@@ -31,6 +31,7 @@
 import org.opends.server.util.args.ArgumentParser;
 
 import static org.opends.messages.QuickSetupMessages.*;
+import static org.opends.server.tools.ToolConstants.*;
 import static org.opends.server.util.DynamicConstants.PRINTABLE_VERSION_STRING;
 
 import org.opends.quicksetup.util.Utils;
@@ -171,7 +172,8 @@
   protected boolean isCli() {
     boolean isCli = false;
     for (String arg : args) {
-      if (arg.equalsIgnoreCase("--cli") || arg.equalsIgnoreCase("-c")) {
+      if (arg.equalsIgnoreCase("--"+OPTION_LONG_CLI) ||
+          arg.equalsIgnoreCase("-"+OPTION_SHORT_CLI)) {
         isCli = true;
         break;
       }
diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/Installer.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/Installer.java
index f29c3c6..16536fa 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/Installer.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/Installer.java
@@ -180,8 +180,8 @@
       if (!QuickSetupLog.isInitialized())
         QuickSetupLog.initLogFileHandler(
                 File.createTempFile(
-                    SetupGuiLauncher.LOG_FILE_PREFIX,
-                    SetupGuiLauncher.LOG_FILE_SUFFIX));
+                    SetupLauncher.LOG_FILE_PREFIX,
+                    SetupLauncher.LOG_FILE_SUFFIX));
     } catch (IOException e) {
       System.err.println("Failed to initialize log");
     }
diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/SetupGuiLauncher.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/SetupLauncher.java
similarity index 74%
rename from opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/SetupGuiLauncher.java
rename to opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/SetupLauncher.java
index 4240331..5dff196 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/SetupGuiLauncher.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/SetupLauncher.java
@@ -28,9 +28,7 @@
 package org.opends.quicksetup.installer;
 
 import static org.opends.messages.QuickSetupMessages.*;
-import static org.opends.messages.ToolMessages.INFO_DESCRIPTION_SHOWUSAGE;
-import static org.opends.server.tools.ToolConstants.OPTION_LONG_HELP;
-import static org.opends.server.tools.ToolConstants.OPTION_SHORT_HELP;
+import static org.opends.messages.ToolMessages.*;
 
 import java.io.File;
 import java.util.logging.Logger;
@@ -43,31 +41,31 @@
 import org.opends.quicksetup.installer.offline.OfflineInstaller;
 import org.opends.quicksetup.util.Utils;
 import org.opends.messages.Message;
-import org.opends.messages.ToolMessages;
+import org.opends.server.tools.InstallDS;
+import org.opends.server.tools.InstallDSArgumentParser;
 import org.opends.server.util.ServerConstants;
 import org.opends.server.util.args.ArgumentException;
 import org.opends.server.util.args.ArgumentParser;
-import org.opends.server.util.args.BooleanArgument;
 
 /**
- * This class is called by the setup GUI command line to launch the setup
+ * This class is called by the setup command line to launch the setup
  * of the Directory Server. It just checks the command line arguments and the
  * environment and determines whether the graphical or the command line
  * based setup much be launched.
  */
-public class SetupGuiLauncher extends Launcher {
+public class SetupLauncher extends Launcher {
 
   /** Prefix for log files. */
-  static public final String LOG_FILE_PREFIX = "opends-setup-gui-";
+  static public final String LOG_FILE_PREFIX = "opends-setup-";
 
   /** Suffix for log files. */
   static public final String LOG_FILE_SUFFIX = ".log";
 
   static private final Logger LOG =
-          Logger.getLogger(SetupGuiLauncher.class.getName());
+          Logger.getLogger(SetupLauncher.class.getName());
 
   /**
-   * The main method which is called by the setup GUI command lines.
+   * The main method which is called by the setup command lines.
    *
    * @param args the arguments passed by the command lines.  In the case
    * we want to launch the cli setup they are basically the arguments that we
@@ -83,23 +81,23 @@
       System.err.println("Unable to initialize log");
       t.printStackTrace();
     }
-    new SetupGuiLauncher(args).launch();
+    new SetupLauncher(args).launch();
   }
 
-  private ArgumentParser argParser;
+  private InstallDSArgumentParser argParser;
 
   /**
    * Creates a launcher.
    *
    * @param args the arguments passed by the command lines.
    */
-  public SetupGuiLauncher(String[] args) {
+  public SetupLauncher(String[] args) {
     super(args);
     String scriptName;
     if (Utils.isWindows()) {
-      scriptName = Installation.WINDOWS_SETUP_GUI_FILE_NAME;
+      scriptName = Installation.WINDOWS_SETUP_FILE_NAME;
     } else {
-      scriptName = Installation.UNIX_SETUP_GUI_FILE_NAME;
+      scriptName = Installation.UNIX_SETUP_FILE_NAME;
     }
     System.setProperty(ServerConstants.PROPERTY_SCRIPT_NAME, scriptName);
     initializeParser();
@@ -110,23 +108,15 @@
    */
   protected void initializeParser()
   {
-    argParser = new ArgumentParser(getClass().getName(),
-        INFO_SETUP_LAUNCHER_USAGE_DESCRIPTION.get(),
-        false);
+    argParser = new InstallDSArgumentParser(InstallDS.class.getName());
     try
     {
-      BooleanArgument showUsageArg = new BooleanArgument("showUsage",
-          OPTION_SHORT_HELP,
-          OPTION_LONG_HELP, INFO_DESCRIPTION_SHOWUSAGE.get());
-      argParser.addArgument(showUsageArg);
-      argParser.setUsageArgument(showUsageArg);
-      argParser.parseArguments(args);
+      argParser.initializeArguments();
     }
     catch (ArgumentException ae)
     {
-      System.err.println(org.opends.server.util.StaticUtils.wrapText(
-          ToolMessages.ERR_CANNOT_INITIALIZE_ARGS.get(ae.getMessage()),
-          Utils.getCommandLineMaxLineWidth()));
+      Message message = ERR_CANNOT_INITIALIZE_ARGS.get(ae.getMessage());
+      System.out.println(message);
     }
   }
 
@@ -148,7 +138,12 @@
         printUsage(false);
       }
       System.exit(ReturnCode.SUCCESSFUL.getReturnCode());
-    } else {
+    }
+    else if (isCli())
+    {
+      System.exit(InstallDS.mainCLI(args));
+    }
+    else {
       willLaunchGui();
       int exitCode = launchGui(args);
       if (exitCode != 0) {
@@ -161,7 +156,7 @@
         {
           guiLaunchFailed(null);
         }
-        System.exit(exitCode);
+        System.exit(InstallDS.mainCLI(args));
       }
     }
   }
@@ -169,13 +164,6 @@
   /**
    * {@inheritDoc}
    */
-  protected boolean isCli() {
-    return false;
-  }
-
-  /**
-   * {@inheritDoc}
-   */
   public ArgumentParser getArgumentParser() {
     return this.argParser;
   }
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 fb7fc88..5b0a3a6 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
@@ -1209,9 +1209,7 @@
     else if (name.endsWith(".sh"))
     {
       perm = "755";
-    } else if (name.endsWith(Installation.UNIX_SETUP_GUI_FILE_NAME) ||
-            name.endsWith(Installation.UNIX_SETUP_FILE_NAME) ||
-            name.endsWith(Installation.UNIX_UNINSTALL_GUI_FILE_NAME) ||
+    } else if (name.endsWith(Installation.UNIX_SETUP_FILE_NAME) ||
             name.endsWith(Installation.UNIX_UNINSTALL_FILE_NAME) ||
             name.endsWith(Installation.UNIX_UPGRADE_FILE_NAME))
     {
diff --git a/opendj-sdk/opends/src/server/org/opends/server/tools/InstallDSArgumentParser.java b/opendj-sdk/opends/src/server/org/opends/server/tools/InstallDSArgumentParser.java
index cb98fd6..558be5d 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/tools/InstallDSArgumentParser.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/tools/InstallDSArgumentParser.java
@@ -57,9 +57,10 @@
  * a given port is free) nor the validity of the certificate information
  * provided.
  */
-class InstallDSArgumentParser extends ArgumentParser
+public class InstallDSArgumentParser extends ArgumentParser
 {
   BooleanArgument   testOnlyArg;
+  BooleanArgument   cliArg;
   BooleanArgument   addBaseEntryArg;
   BooleanArgument   showUsageArg;
   BooleanArgument   quietArg;
@@ -114,6 +115,13 @@
     testOnlyArg.setHidden(true);
     addArgument(testOnlyArg);
 
+    cliArg = new BooleanArgument(
+        OPTION_LONG_CLI,
+        OPTION_SHORT_CLI,
+        OPTION_LONG_CLI,
+        INFO_INSTALLDS_DESCRIPTION_CLI.get());
+    addArgument(cliArg);
+
     configFileArg = new StringArgument(
         "configfile", 'c', "configFile", false,
         false, true, "{configFile}", getDefaultConfigFile(), null,
diff --git a/opendj-sdk/opends/src/server/org/opends/server/tools/ToolConstants.java b/opendj-sdk/opends/src/server/org/opends/server/tools/ToolConstants.java
index 57602f3..b33e259 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/tools/ToolConstants.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/tools/ToolConstants.java
@@ -458,6 +458,11 @@
   public static final String OPTION_LONG_CLI = "cli";
 
   /**
+   * The value for the short option cli.
+   */
+  public static final char OPTION_SHORT_CLI = 'i';
+
+  /**
    * The value for the short option proxyAs.
    */
   public static final char OPTION_SHORT_PROXYAUTHID = 'Y';
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/functions/dsadm.xml b/opendj-sdk/opends/tests/functional-tests/shared/functions/dsadm.xml
index e0c1be8..8ce0be0 100755
--- a/opendj-sdk/opends/tests/functional-tests/shared/functions/dsadm.xml
+++ b/opendj-sdk/opends/tests/functional-tests/shared/functions/dsadm.xml
@@ -110,6 +110,7 @@
 
         if dsPath:
           STAFCmd='%s/setup%s' % (dsPath,fileExt)
+          STAFCmdParamsList.append('--cli')
           STAFCmdParamsList.append('-n')    
                   
         if dsPort:
diff --git a/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/quicksetup/TestUtilities.java b/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/quicksetup/TestUtilities.java
index ebaabc3..5fcda0c 100644
--- a/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/quicksetup/TestUtilities.java
+++ b/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/quicksetup/TestUtilities.java
@@ -44,7 +44,7 @@
  *
  */
 public class TestUtilities {
-    
+
   /**
    * The name of the system property that specifies the server build root.
    */
@@ -95,6 +95,7 @@
     } else {
       args.add(new File(root, "setup.bat").getPath());
     }
+    args.add("--cli");
     args.add("-n");
     args.add("-p");
     args.add(Integer.toString(ldapPort));

--
Gitblit v1.10.0