From c09124d6ae9060ea52a6d8bc284140f8ab95fbe9 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Thu, 03 May 2007 03:56:41 +0000
Subject: [PATCH] Implement support for config file change detection, which can detect external edits to the server configuration (e.g., manually updating the file in a text editor) with the server online.  If the server detects that the configuration file has been externally modified when it needs to rewrite it to apply a change coming in through protocol, then it will attempt to copy the manually-edited file off to the side and will generate an administrative alert and write a log message to let administrators know what happened.

---
 opends/src/server/org/opends/server/util/ServerConstants.java |   50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 50 insertions(+), 0 deletions(-)

diff --git a/opends/src/server/org/opends/server/util/ServerConstants.java b/opends/src/server/org/opends/server/util/ServerConstants.java
index b8b39f9..50faed6 100644
--- a/opends/src/server/org/opends/server/util/ServerConstants.java
+++ b/opends/src/server/org/opends/server/util/ServerConstants.java
@@ -1326,6 +1326,56 @@
 
   /**
    * The description for the alert type that will be used for the alert
+   * notification generated if the server detects that the configuration has
+   * been manually edited with the server online and those edits would have been
+   * lost by an online config change.
+   */
+  public static final String ALERT_DESCRIPTION_MANUAL_CONFIG_EDIT_HANDLED =
+      "This alert type will be used to notify administrators if the " +
+      "Directory Server detects that its configuration has been manually " +
+      "edited with the server online and those changes were overwritten by " +
+      "another change made through the server.  The manually-edited " +
+      "configuration will be copied off to another location.";
+
+
+
+  /**
+   * The alert type string that will be used for the alert notification
+   * generated if a problem occurs while attempting to write the Directory
+   * Server configuration to disk.
+   */
+  public static final String ALERT_TYPE_MANUAL_CONFIG_EDIT_HANDLED =
+       "org.opends.server.ManualConfigEditHandled";
+
+
+
+  /**
+   * The description for the alert type that will be used for the alert
+   * notification generated if the server detects that the configuration has
+   * been manually edited with the server online, but a problem occurred while
+   * trying to preserve the manual changes that may have caused them to be lost.
+   */
+  public static final String ALERT_DESCRIPTION_MANUAL_CONFIG_EDIT_LOST =
+      "This alert type will be used to notify administrators if the " +
+      "Directory Server detects that its configuration has been manually " +
+      "edited with the server online and those changes were overwritten by " +
+      "another change made through the server.  The manually-edited " +
+      "configuration could not be preserved due to an unexpected error.";
+
+
+
+  /**
+   * The alert type string that will be used for the alert notification
+   * generated if a problem occurs while attempting to write the Directory
+   * Server configuration to disk.
+   */
+  public static final String ALERT_TYPE_MANUAL_CONFIG_EDIT_LOST =
+       "org.opends.server.ManualConfigEditLost";
+
+
+
+  /**
+   * The description for the alert type that will be used for the alert
    * notification generated if an error occurs while attempting to write the
    * tasks backing file.
    */

--
Gitblit v1.10.0