From 184ed890c828220c114f60ee165ce2230ada3d7c Mon Sep 17 00:00:00 2001
From: lutoff <lutoff@localhost>
Date: Tue, 15 May 2007 08:10:13 +0000
Subject: [PATCH] issue 1430 fix (all utilities should provide as standard option -V/--version) to specify the LDAP protocol version number, we should use now -V/--ldapVersion to get the 'product' version --version
---
opends/src/statuspanel/org/opends/statuspanel/StatusCli.java | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/opends/src/statuspanel/org/opends/statuspanel/StatusCli.java b/opends/src/statuspanel/org/opends/statuspanel/StatusCli.java
index a34d80f..c3729ef 100644
--- a/opends/src/statuspanel/org/opends/statuspanel/StatusCli.java
+++ b/opends/src/statuspanel/org/opends/statuspanel/StatusCli.java
@@ -30,6 +30,7 @@
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
+import java.io.IOException;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.HashSet;
@@ -128,6 +129,7 @@
ArrayList<String> errors = new ArrayList<String>();
boolean printUsage = false;
+ boolean printVersion = false;
String directoryManagerPwd = null;
String directoryManagerPwdFile = null;
@@ -141,6 +143,12 @@
{
printUsage = true;
}
+ else
+ if (args[i].equalsIgnoreCase("-" + OPTION_SHORT_PRODUCT_VERSION) ||
+ args[i].equalsIgnoreCase("--" + OPTION_LONG_PRODUCT_VERSION))
+ {
+ printVersion = true;
+ }
else if (args[i].equalsIgnoreCase("-D") ||
args[i].equalsIgnoreCase("--bindDN"))
{
@@ -245,6 +253,17 @@
{
printUsage(System.out);
}
+ else if(printVersion)
+ {
+ try
+ {
+ DirectoryServer.printVersion(System.out);
+ }
+ catch (IOException e)
+ {
+ // TODO Auto-generated catch block
+ }
+ }
else if (errors.size() > 0)
{
System.err.println(Utils.getStringFromCollection(errors,
--
Gitblit v1.10.0