From d805a36cc67fa38d11eda2f09f661ba21c6add70 Mon Sep 17 00:00:00 2001
From: lutoff <lutoff@localhost>
Date: Tue, 10 Jul 2007 08:00:47 +0000
Subject: [PATCH] fix for issue #1865 (upgrade -V error) In case on -V option, BuildExtractor will exit with a pre-defined return code defined in QuickSetupCli.java (let's say 50). Script will test this specific return value to check if the non-null return code is an error. In case of none null return code, the upgradeLauncher will not be called.
---
opends/resource/upgrade | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/opends/resource/upgrade b/opends/resource/upgrade
index b2e2857..90e2792 100644
--- a/opends/resource/upgrade
+++ b/opends/resource/upgrade
@@ -136,7 +136,8 @@
done
export CLASSPATH
"${JAVA_BIN}" org.opends.quicksetup.upgrader.BuildExtractor "${@}"
-if test $? -eq 0
+RETURN_CODE=$?
+if test ${RETURN_CODE} -eq 0
then
# Configure the appropriate CLASSPATH.
# Unlike BuildExtractor, the Upgrader uses
@@ -148,6 +149,10 @@
done
# Launch the upgrade process.
"${JAVA_BIN}" org.opends.quicksetup.upgrader.UpgradeLauncher "${@}"
+elif test ${RETURN_CODE} -eq 50
+then
+ # Version info was on requested
+ exit 0
else
exit 101
fi
--
Gitblit v1.10.0