cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edi...@apache.org
Subject git commit: updated refs/heads/master to 609951f
Date Tue, 28 Oct 2014 00:32:01 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master 20fdc93a5 -> 609951ffe


fix kvm agent upgrade issue: kvm agent needs to use java 7 instead of java 6 after upgrade
Reviewed-by: Sheng


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/609951ff
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/609951ff
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/609951ff

Branch: refs/heads/master
Commit: 609951ffeb3cda05792b24ecf7225cfb4d942827
Parents: 20fdc93
Author: Edison Su <sudison@gmail.com>
Authored: Mon Oct 27 17:24:52 2014 -0700
Committer: Edison Su <sudison@gmail.com>
Committed: Mon Oct 27 17:31:31 2014 -0700

----------------------------------------------------------------------
 agent/distro/rhel/SYSCONFDIR/rc.d/init.d/cloud-agent.in | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/609951ff/agent/distro/rhel/SYSCONFDIR/rc.d/init.d/cloud-agent.in
----------------------------------------------------------------------
diff --git a/agent/distro/rhel/SYSCONFDIR/rc.d/init.d/cloud-agent.in b/agent/distro/rhel/SYSCONFDIR/rc.d/init.d/cloud-agent.in
index d1769cc..271d45d 100644
--- a/agent/distro/rhel/SYSCONFDIR/rc.d/init.d/cloud-agent.in
+++ b/agent/distro/rhel/SYSCONFDIR/rc.d/init.d/cloud-agent.in
@@ -44,14 +44,17 @@ unset OPTIONS
 [ -r @SYSCONFDIR@/sysconfig/"$SHORTNAME" ] && source @SYSCONFDIR@/sysconfig/"$SHORTNAME"
 
 # The first existing directory is used for JAVA_HOME (if JAVA_HOME is not defined in $DEFAULT)
-JDK_DIRS="/usr/lib/jvm/jre /usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-openjdk-i386 /usr/lib/jvm/java-6-openjdk-amd64
/usr/lib/jvm/java-6-sun /usr/lib/jvm/java-1.5.0-sun /usr/lib/j2sdk1.5-sun /usr/lib/j2sdk1.5-ibm"
+JDK_DIRS="/usr/lib/jvm/jre /usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-openjdk-i386 /usr/lib/jvm/java-6-openjdk-amd64
/usr/lib/jvm/java-6-sun /usr/lib/jvm/java-1.5.0-sun /usr/lib/j2sdk1.5-sun /usr/lib/j2sdk1.5-ibm
/usr/lib/jvm/jre-1.7.0"
 
+jhome=""
 for jdir in $JDK_DIRS; do
     if [ -r "$jdir/bin/java" -a -z "${JAVA_HOME}" ]; then
-        JAVA_HOME="$jdir"
+        jhome="$jdir"
     fi
 done
-export JAVA_HOME
+if [ ! -z $jhome ];then
+export JAVA_HOME="$jhome"
+fi
 
 SCP="@SYSTEMCLASSPATH@"
 DCP="@DEPSCLASSPATH@"


Mime
View raw message