From 724dc38dfdca4df6b5426d1feba964aa3892a417 Mon Sep 17 00:00:00 2001
From: kenneth_suter <kenneth_suter@localhost>
Date: Thu, 20 Sep 2007 19:31:21 +0000
Subject: [PATCH] Fix for issue 2227 in which unpredictable behavior results from an upgrade or reversion process replacing the upgrade script while the upgrade process is running on Windows. This code will compare the running version of the script with the new version to see whether or not the script actually needs replacing. If so the script is copied with an extension NEW. When the script starts it checks for the existence of upgrade.bat.NEW and if exists prints a message informing the user that they must replace the old version of the script with the new version before continuing.
---
opends/src/quicksetup/org/opends/quicksetup/Installation.java | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/opends/src/quicksetup/org/opends/quicksetup/Installation.java b/opends/src/quicksetup/org/opends/quicksetup/Installation.java
index 3f3e0e2..742d070 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/Installation.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/Installation.java
@@ -164,6 +164,16 @@
public static final String WINDOWS_UPGRADE_FILE_NAME = "upgrade.bat";
/**
+ * Newly upgraded Windows upgrade batch file name. When the upgrade
+ * batch file requires upgrade it is not done during execution of the
+ * upgrade utility itself since replacing a running script on Windows
+ * with a different version leads to unpredictable results. Instead
+ * this new name is used for the upgraded version and the user is
+ * expected to manually rename the file following the upgrade.
+ */
+ public static final String WINDOWS_UPGRADE_FILE_NAME_NEW = "upgrade.bat.NEW";
+
+ /**
* The UNIX start script file name.
*/
public static final String UNIX_START_FILE_NAME = "start-ds";
--
Gitblit v1.10.0