From a4025c597224b522603858f50b0c41658234020b Mon Sep 17 00:00:00 2001
From: lutoff <lutoff@localhost>
Date: Fri, 13 Jul 2007 09:09:26 +0000
Subject: [PATCH] fix for issue #1897 (verif-index , rebuild-index return 0 in case of errors): return code '1' is now returned in case of error. In addition to that, the following argument has been add in order to get the number of errors found by verify-index: "--countErrors" 

---
 opends/src/server/org/opends/server/messages/ToolMessages.java |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/opends/src/server/org/opends/server/messages/ToolMessages.java b/opends/src/server/org/opends/server/messages/ToolMessages.java
index 9b8d828..f1d57ae 100644
--- a/opends/src/server/org/opends/server/messages/ToolMessages.java
+++ b/opends/src/server/org/opends/server/messages/ToolMessages.java
@@ -9017,6 +9017,14 @@
        CATEGORY_MASK_TOOLS | SEVERITY_MASK_SEVERE_ERROR | 1198;
 
   /**
+   * The message ID for the message that will be used as the description of the
+   * countErrors argument. This does not take any arguments.
+   */
+  public static final int MSGID_VERIFYINDEX_DESCRIPTION_COUNT_ERRORS =
+    CATEGORY_MASK_TOOLS | SEVERITY_MASK_INFORMATIONAL | 1199;
+
+
+  /**
    * Associates a set of generic messages with the message IDs defined in this
    * class.
    */
@@ -9822,6 +9830,10 @@
                     "shared lock for backend %s:  %s.  This lock should " +
                     "automatically be cleared when the verification process " +
                     "exits, so no further action should be required");
+    registerMessage(MSGID_VERIFYINDEX_DESCRIPTION_COUNT_ERRORS,
+                    "Count the number of errors found during the verification "+
+                    "and return that value as the exit code (values > 255 " +
+                    "will be reduced to 255 due to exit code restrictions)");
     registerMessage(MSGID_MULTIPLE_BACKENDS_FOR_BASE,
                     "Multiple Directory Server backends are configured to " +
                     "support base DN \"%s\"");

--
Gitblit v1.10.0