From 532463a23dac7820a1804985595a18aac58711e1 Mon Sep 17 00:00:00 2001
From: chebrard <chebrard@localhost>
Date: Mon, 04 May 2009 12:52:53 +0000
Subject: [PATCH] Fix for issue #3958: Upgrade should support products built on top of OpenDS
---
opends/src/server/org/opends/server/tools/configurator/CheckInstance.java | 29 +++++++++++++++++++++--------
1 files changed, 21 insertions(+), 8 deletions(-)
diff --git a/opends/src/server/org/opends/server/tools/configurator/CheckInstance.java b/opends/src/server/org/opends/server/tools/configurator/CheckInstance.java
index 060a626..06eb2db 100644
--- a/opends/src/server/org/opends/server/tools/configurator/CheckInstance.java
+++ b/opends/src/server/org/opends/server/tools/configurator/CheckInstance.java
@@ -277,19 +277,32 @@
System.exit(USER_ERROR);
}
+ // Initialize buildinfo in not already done (ZIP delivery)
+ BuildInformation installBi =
+ BuildInformation.fromBuildString(MAJOR_VERSION +
+ "." + MINOR_VERSION +
+ "." + POINT_VERSION +
+ "." + REVISION_NUMBER);
+ File bif = new File(confDir, Installation.BUILDINFO_RELATIVE_PATH);
+ if (!bif.exists()) {
+ FileWriter fwriter = null;
+ try {
+ fwriter = new FileWriter(bif, true);
+ fwriter.append(installBi.getBuildString());
+ } catch (Exception e) {
+ } finally {
+ try {
+ fwriter.close();
+ } catch (Exception e) {
+ }
+ }
+ }
// Check version
if (checkVersionArg.isPresent()) {
- BuildInformation installBi =
- BuildInformation.fromBuildString(MAJOR_VERSION +
- "." + MINOR_VERSION +
- "." + POINT_VERSION +
- "." + REVISION_NUMBER);
BuildInformation instanceBi = installBi;
try {
- File bif = new File(confDir, Installation.BUILDINFO_RELATIVE_PATH);
-
if (bif.exists()) {
BufferedReader breader = new BufferedReader(new FileReader(bif));
@@ -365,4 +378,4 @@
System.exit(SUCCESS);
}
-}
+}
\ No newline at end of file
--
Gitblit v1.10.0