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

Matthew Swift
25.52.2011 4ba18bd84e711f2a77f1de9b66fb9b52730d1d46
opends/src/server/org/opends/server/tools/InstallDS.java
@@ -1218,6 +1218,9 @@
   */
  private void promptIfRequiredForPortData(UserData uData)
  {
    String hostName = promptForHostNameIfRequired();
    uData.setHostName(hostName);
    LinkedList<Integer> usedPorts = new LinkedList<Integer>();
    //  Determine the LDAP port number.
    int ldapPort = promptIfRequiredForPortData(argParser.ldapPortArg,
@@ -1365,6 +1368,7 @@
    boolean prompt = true;
    if (!argParser.baseDNArg.isPresent())
    {
      println();
      try
      {
        prompt = confirmAction(INFO_INSTALLDS_PROVIDE_BASE_DN_PROMPT.get(),
@@ -1765,8 +1769,6 @@
    {
      securityOptions = SecurityOptions.createSelfSignedCertificateOptions(
          enableSSL, enableStartTLS, ldapsPort);
      String hostName = promptForHostNameIfRequired();
      uData.setHostName(hostName);
    }
    else if (argParser.useJavaKeyStoreArg.isPresent())
    {
@@ -1878,8 +1880,6 @@
        }
        if (certType == SELF_SIGNED)
        {
          String hostName = promptForHostNameIfRequired();
          uData.setHostName(hostName);
          securityOptions = SecurityOptions.createSelfSignedCertificateOptions(
                enableSSL, enableStartTLS, ldapsPort);
        }
@@ -2761,7 +2761,7 @@
    }
  }
  private String promptForHostNameIfRequired() throws UserDataException
  private String promptForHostNameIfRequired()
  {
    String hostName = null;
    if (argParser.hostNameArg.isPresent())
@@ -2770,15 +2770,9 @@
    }
    else
    {
      int nTries = 0;
      println();
      while (hostName == null)
      {
        if (nTries >= CONFIRMATION_MAX_TRIES)
        {
          throw new UserDataException(null,
              ERR_TRIES_LIMIT_REACHED.get(CONFIRMATION_MAX_TRIES));
        }
        try
        {
          hostName = readInput(INFO_INSTALLDS_PROMPT_HOST_NAME.get(),