From 99b598887bfb189b38ac3ae97abe0a303bc1063c Mon Sep 17 00:00:00 2001 From: Attila Fazekas Date: Tue, 24 Feb 2015 12:15:21 +0100 Subject: [PATCH] Fedora-21 has openjdk-1.8.0 only Fedora-21 does not have openjdk-1.7.0 it has only 1.8.0. This change also fixing the no op statement in the configure. Change-Id: I6012aeb17b8e8fafa37d48aa29482702fa3491fd --- files/rpms/general | 3 ++- pkg/elasticsearch.sh | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/files/rpms/general b/files/rpms/general index a648214a7b..56a933190c 100644 --- a/files/rpms/general +++ b/files/rpms/general @@ -27,4 +27,5 @@ bc libyaml-devel gettext # used for compiling message catalogs net-tools -java-1.7.0-openjdk-headless # NOPRIME +java-1.7.0-openjdk-headless # NOPRIME rhel7,f20 +java-1.8.0-openjdk-headless # NOPRIME f21,f22 diff --git a/pkg/elasticsearch.sh b/pkg/elasticsearch.sh index 15e1b2b594..447596a8db 100755 --- a/pkg/elasticsearch.sh +++ b/pkg/elasticsearch.sh @@ -44,7 +44,7 @@ function download_elasticsearch { function configure_elasticsearch { # currently a no op - :: + : } function start_elasticsearch { @@ -78,7 +78,11 @@ function install_elasticsearch { sudo dpkg -i ${FILES}/elasticsearch-${ELASTICSEARCH_VERSION}.deb sudo update-rc.d elasticsearch defaults 95 10 elif is_fedora; then - is_package_installed java-1.7.0-openjdk-headless || install_package java-1.7.0-openjdk-headless + if [[ "$os_RELEASE" -ge "21" ]]; then + is_package_installed java-1.8.0-openjdk-headless || install_package java-1.8.0-openjdk-headless + else + is_package_installed java-1.7.0-openjdk-headless || install_package java-1.7.0-openjdk-headless + fi yum_install ${FILES}/elasticsearch-${ELASTICSEARCH_VERSION}.noarch.rpm sudo /bin/systemctl daemon-reload sudo /bin/systemctl enable elasticsearch.service