From 882e51b3ada821426c91aabc085d21e3fe2e0b03 Mon Sep 17 00:00:00 2001
From: Violette Roche-Montane <violette.roche-montane@forgerock.com>
Date: Tue, 04 Mar 2014 09:55:16 +0000
Subject: [PATCH] Backport CR-3127 OPENDJ-1098 – Upgrading must disable old patches

---
 opends/resource/upgrade |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/opends/resource/upgrade b/opends/resource/upgrade
index f45bd0d..b8f9040 100644
--- a/opends/resource/upgrade
+++ b/opends/resource/upgrade
@@ -22,7 +22,7 @@
 # CDDL HEADER END
 #
 #
-#      Copyright 2013 ForgeRock AS
+#      Copyright 2013-2014 ForgeRock AS
 
 
 # This script may be used to perform a backup of a Directory Server backend.
@@ -32,5 +32,13 @@
 SCRIPT_NAME="upgrade"
 export SCRIPT_NAME
 
+DIR_CLASSES="./classes"
+# The upgrade is not compatible with patches. If the folder is not empty
+# we renamed it as "classes.disabled", and the upgrade process should be launched properly.
+if [ "`(ls -A ${DIR_CLASSES})`" ]; then
+    mv -f ${DIR_CLASSES} "./classes.disabled"
+    mkdir ${DIR_CLASSES}
+fi
+
 SCRIPT_DIR=`dirname "${0}"`
 "${SCRIPT_DIR}/lib/_server-script.sh" "${@}"

--
Gitblit v1.10.0