You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by ve...@apache.org on 2015/03/31 00:57:28 UTC
incubator-ranger git commit: RANGER-348: Allow ranger admin install
with JDK 1.8
Repository: incubator-ranger
Updated Branches:
refs/heads/master 7058bbbed -> 56be11981
RANGER-348: Allow ranger admin install with JDK 1.8
Project: http://git-wip-us.apache.org/repos/asf/incubator-ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ranger/commit/56be1198
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/56be1198
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/56be1198
Branch: refs/heads/master
Commit: 56be1198139612c2577b42203f998075bd569987
Parents: 7058bbb
Author: Velmurugan Periasamy <ve...@apache.org>
Authored: Mon Mar 30 18:55:58 2015 -0400
Committer: Velmurugan Periasamy <ve...@apache.org>
Committed: Mon Mar 30 18:55:58 2015 -0400
----------------------------------------------------------------------
security-admin/scripts/setup.sh | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/56be1198/security-admin/scripts/setup.sh
----------------------------------------------------------------------
diff --git a/security-admin/scripts/setup.sh b/security-admin/scripts/setup.sh
index 962515c..ffc8e2a 100755
--- a/security-admin/scripts/setup.sh
+++ b/security-admin/scripts/setup.sh
@@ -238,9 +238,11 @@ check_java_version() {
exit 1;
fi
- $JAVA_BIN -version 2>&1 | grep -q $JAVA_VERSION_REQUIRED
- if [ $? != 0 ] ; then
- log "[E] Java 1.7 is required"
+ version=$("$JAVA_BIN" -version 2>&1 | awk -F '"' '/version/ {print $2}')
+ major=`echo ${version} | cut -d. -f1`
+ minor=`echo ${version} | cut -d. -f2`
+ if [[ "${major}" == 1 && "${minor}" < 7 ]] ; then
+ log "[E] Java 1.7 is required, current java version is $version"
exit 1;
fi