mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

jvergara
19.32.2007 232d13d704160f8b3f8a7a3acfabee33d5349fc1
In order to be coherent with the graphical UI and because it is more intuitive option, substitute the "noWindowsService" option of the CLI setup by "enableWindowsService" option.  The WIKI has been updated to reflect these changes.
6 files modified
56 ■■■■■ changed files
opends/src/quicksetup/org/opends/quicksetup/installer/InstallLauncher.java 10 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/messages/ToolMessages.java 8 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/tools/InstallDS.java 16 ●●●● patch | view | raw | blame | history
opends/tests/functional-tests/shared/functions/dsadm.xml 8 ●●●● patch | view | raw | blame | history
opends/tests/functional-tests/shared/functions/topology.xml 6 ●●●● patch | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/quicksetup/TestUtilities.java 8 ●●●● patch | view | raw | blame | history
opends/src/quicksetup/org/opends/quicksetup/installer/InstallLauncher.java
@@ -141,7 +141,7 @@
    BooleanArgument   showUsage;
    BooleanArgument   silentInstall;
    BooleanArgument   skipPortCheck;
    BooleanArgument   noWindowsService;
    BooleanArgument   enableWindowsService;
    FileBasedArgument rootPWFile;
    IntegerArgument   ldapPort;
    IntegerArgument   jmxPort;
@@ -225,12 +225,12 @@
          null, null, MSGID_INSTALLDS_DESCRIPTION_ROOTPWFILE);
      argParser.addArgument(rootPWFile);
      noWindowsService = new BooleanArgument("nowindowsservice", 'n',
          "noWindowsService",
          MSGID_INSTALLDS_DESCRIPTION_NO_WINDOWS_SERVICE);
      enableWindowsService = new BooleanArgument("enablewindowsservice", 'e',
          "enableWindowsService",
          MSGID_INSTALLDS_DESCRIPTION_ENABLE_WINDOWS_SERVICE);
      if (SetupUtils.isWindows())
      {
        argParser.addArgument(noWindowsService);
        argParser.addArgument(enableWindowsService);
      }
      showUsage = new BooleanArgument("help", OPTION_SHORT_HELP,
opends/src/server/org/opends/server/messages/ToolMessages.java
@@ -6676,10 +6676,10 @@
       CATEGORY_MASK_TOOLS | SEVERITY_MASK_INFORMATIONAL | 842;
  /**
   * The message ID for the message for the description of the No Windows
   * The message ID for the message for the description of the Enable Windows
   * service.  This does not take any argument.
   */
  public static final int MSGID_INSTALLDS_DESCRIPTION_NO_WINDOWS_SERVICE =
  public static final int MSGID_INSTALLDS_DESCRIPTION_ENABLE_WINDOWS_SERVICE =
      CATEGORY_MASK_TOOLS | SEVERITY_MASK_INFORMATIONAL | 843;
@@ -10442,8 +10442,8 @@
    registerMessage(MSGID_INSTALLDS_DESCRIPTION_ROOTPWFILE,
                    "Specifies the path to a file containing the password " +
                    "for the initial root user for the Directory Server");
    registerMessage(MSGID_INSTALLDS_DESCRIPTION_NO_WINDOWS_SERVICE,
                    "Do not enable OpenDS to run as a Windows Service");
    registerMessage(MSGID_INSTALLDS_DESCRIPTION_ENABLE_WINDOWS_SERVICE,
                    "Enable OpenDS to run as a Windows Service");
    registerMessage(MSGID_INSTALLDS_DESCRIPTION_HELP,
                    "Display this usage information");
    registerMessage(MSGID_INSTALLDS_NO_CONFIG_FILE,
opends/src/server/org/opends/server/tools/InstallDS.java
@@ -178,7 +178,7 @@
    BooleanArgument   showUsage;
    BooleanArgument   silentInstall;
    BooleanArgument   skipPortCheck;
    BooleanArgument   noWindowsService;
    BooleanArgument   enableWindowsService;
    FileBasedArgument rootPWFile;
    IntegerArgument   ldapPort;
    IntegerArgument   jmxPort;
@@ -292,12 +292,12 @@
                            null, null, MSGID_INSTALLDS_DESCRIPTION_ROOTPWFILE);
      argParser.addArgument(rootPWFile);
      noWindowsService = new BooleanArgument("nowindowsservice", 'n',
                                "noWindowsService",
                                MSGID_INSTALLDS_DESCRIPTION_NO_WINDOWS_SERVICE);
      enableWindowsService = new BooleanArgument("enablewindowsservice", 'e',
                            "enableWindowsService",
                            MSGID_INSTALLDS_DESCRIPTION_ENABLE_WINDOWS_SERVICE);
      if (SetupUtils.isWindows())
      {
        argParser.addArgument(noWindowsService);
        argParser.addArgument(enableWindowsService);
      }
      showUsage = new BooleanArgument("help", OPTION_SHORT_HELP,
@@ -823,11 +823,11 @@
    {
      if (silentInstall.isPresent())
      {
        enableService = !noWindowsService.isPresent();
        enableService = enableWindowsService.isPresent();
      }
      else if (noWindowsService.isPresent())
      else if (enableWindowsService.isPresent())
      {
        enableService = false;
        enableService = true;
      }
      else
      {
opends/tests/functional-tests/shared/functions/dsadm.xml
@@ -81,9 +81,9 @@
        </function-arg-description>
        <function-arg-property name="type" value="filename"/>
      </function-arg-def>
      <function-arg-def name="dsNoWindowsService" type="optional">
      <function-arg-def name="dsEnableWindowsService" type="optional">
        <function-arg-description>
          Do not enable as a Windows Service
          Enable as a Windows Service
        </function-arg-description>
        <function-arg-property name="type" value="boolean"/>
      </function-arg-def>            
@@ -125,8 +125,8 @@
        if dsBindPwdFile:
          STAFCmdParamsList.append('-j "%s"' % dsBindPwdFile)
        if dsNoWindowsService:
          STAFCmdParamsList.append('-n')
        if dsEnableWindowsService:
          STAFCmdParamsList.append('-e')
        
        if dsHelp:
          STAFCmdParamsList.append('-H')
opends/tests/functional-tests/shared/functions/topology.xml
@@ -404,13 +404,13 @@
      <if expr="isWindows">
        <script>
          noWindowsService='true'
          enableWindowsService=''
        </script>
             
      <else>
      
        <script>
          noWindowsService=''
          enableWindowsService=''
        </script>
        
      </else>
@@ -429,7 +429,7 @@
          'dsBindDN'  : dsBindDN,
          'dsBindPwd' : dsBindPwd,
          'dsBaseDN'  : dsBaseDN,
          'dsNoWindowsService' : noWindowsService }
          'dsEnableWindowsService' : enableWindowsService}
      </call>
                        
      <call function="'checkRC'">
opends/tests/unit-tests-testng/src/server/org/opends/quicksetup/TestUtilities.java
@@ -103,9 +103,7 @@
    args.add(Integer.toString(jmxPort));
    args.add("-w");
    args.add(DIRECTORY_MANAGER_PASSWORD);
    if (isWindows()) {
      args.add("-n"); // don't install Windows service
    }
    ProcessBuilder pb = new ProcessBuilder(args);
    Process p = pb.start();
    if (p.waitFor() != 0) {
@@ -151,8 +149,4 @@
  static public File getQuickSetupTestServerRootDir() {
    return new File(getQuickSetupTestWorkspace(), "OpenDS");
  }
  static public boolean isWindows() {
    return File.separator.equals("\\");
  }
}