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
This commit is contained in:
Attila Fazekas 2015-02-24 12:15:21 +01:00
parent 7cffc6c992
commit 99b598887b
2 changed files with 8 additions and 3 deletions

View File

@ -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

View File

@ -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