Merge "Fedora-21 has openjdk-1.8.0 only"

This commit is contained in:
Jenkins 2015-02-25 16:34:58 +00:00 committed by Gerrit Code Review
commit da533fa790
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
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