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

lutoff
15.10.2007 184ed890c828220c114f60ee165ce2230ada3d7c
opends/src/server/org/opends/server/core/DirectoryServer.java
@@ -29,6 +29,8 @@
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
import java.net.InetAddress;
import java.util.Collections;
@@ -8327,6 +8329,33 @@
    return buffer.toString();
  }
  /**
   * Prints out the version string for the Directory Server.
   *
   *
   * @param  outputStream  The output stream to which the version information
   *                       should be written.
   *
   * @throws  IOException  If a problem occurs while attempting to write the
   *                       version information to the provided output stream.
   */
  public static void printVersion(OutputStream outputStream)
  throws IOException
  {
    StringBuilder buffer = new StringBuilder();
    buffer.append(getVersionString());
    buffer.append(EOL);
    buffer.append("Build " + BUILD_ID);
    buffer.append(EOL);
    if ((FIX_IDS != null) && (FIX_IDS.length() > 0))
    {
      buffer.append("Fix IDs:  " + FIX_IDS);
      buffer.append(EOL);
    }
    outputStream.write(getBytes(buffer.toString()));
    return;
  }
  /**
@@ -8613,7 +8642,6 @@
    BooleanArgument fullVersion       = null;
    BooleanArgument noDetach          = null;
    BooleanArgument systemInfo        = null;
    BooleanArgument version           = null;
    StringArgument  configClass       = null;
    StringArgument  configFile        = null;
@@ -8658,11 +8686,6 @@
      argParser.addArgument(windowsNetStart);
      version = new BooleanArgument("version", 'V', "version",
                                    MSGID_DSCORE_DESCRIPTION_VERSION);
      argParser.addArgument(version);
      fullVersion = new BooleanArgument("fullversion", 'F', "fullVersion",
                                        MSGID_DSCORE_DESCRIPTION_FULLVERSION);
      fullVersion.setHidden(true);
@@ -8738,13 +8761,13 @@
      //   that is something other than NOTHING_TO_DO, SERVER_ALREADY_STARTED,
      //   START_AS_DETACH, START_AS_NON_DETACH, START_AS_WINDOWS_SERVICE to
      //   indicate that a problem occurred.
      if (argParser.usageDisplayed())
      if (argParser.usageOrVersionDisplayed())
      {
        // We're just trying to display usage, and that's already been done so
        // exit with a code of zero.
        System.exit(NOTHING_TO_DO);
      }
      else if (fullVersion.isPresent() || version.isPresent() ||
      else if (fullVersion.isPresent() ||
               systemInfo.isPresent() || dumpMessages.isPresent())
      {
        // We're not really trying to start, so rebuild the argument list
@@ -8768,7 +8791,7 @@
        System.exit(checkStartability(argParser));
      }
    }
    else if (argParser.usageDisplayed())
    else if (argParser.usageOrVersionDisplayed())
    {
      System.exit(0);
    }
@@ -8792,18 +8815,6 @@
      return;
    }
    else if (version.isPresent())
    {
      System.out.println(getVersionString());
      System.out.println("Build " + BUILD_ID);
      if ((FIX_IDS != null) && (FIX_IDS.length() > 0))
      {
        System.out.println("Fix IDs:  " + FIX_IDS);
      }
      return;
    }
    else if (systemInfo.isPresent())
    {
      System.out.println(getVersionString());