aboutsummaryrefslogtreecommitdiffstats
path: root/bootstrap/vagrant-onap
diff options
context:
space:
mode:
authorVictor Morales <victor.morales@intel.com>2017-08-08 11:11:36 -0500
committerVictor Morales <victor.morales@intel.com>2017-08-08 11:16:47 -0500
commitece790c24e7b22b2adc53cae9d1fa168f00ba97a (patch)
tree6b1c4ccf6a70f2325cd6977f90e474a7ae0fabfb /bootstrap/vagrant-onap
parent1346b687b8615f60ca8419c55512af5b3152a2f1 (diff)
Add validation in install_java function
The install_java function didn't have a validation that checks if the java package was already installed. This change adds the verification as part of the installation process. Change-Id: I1aafb60a3f2f8137c810da3afcac7b0d6f86ed63 Signed-off-by: Victor Morales <victor.morales@intel.com>
Diffstat (limited to 'bootstrap/vagrant-onap')
-rwxr-xr-xbootstrap/vagrant-onap/lib/functions7
1 files changed, 4 insertions, 3 deletions
diff --git a/bootstrap/vagrant-onap/lib/functions b/bootstrap/vagrant-onap/lib/functions
index eeced5a34..d0a7d9787 100755
--- a/bootstrap/vagrant-onap/lib/functions
+++ b/bootstrap/vagrant-onap/lib/functions
@@ -73,6 +73,9 @@ function _install_bind {
# install_java() - Install java binaries
function install_java {
+ if is_package_installed openjdk-8-jdk; then
+ return
+ fi
install_package software-properties-common
add-apt-repository -y ppa:openjdk-r/ppa
install_package openjdk-8-jdk
@@ -85,9 +88,7 @@ function install_maven {
if is_package_installed maven3; then
return
fi
- if ! is_package_installed openjdk-8-jdk; then
- install_java
- fi
+ install_java
install_package software-properties-common
add-apt-repository -y ppa:andrei-pozolotin/maven3
install_package maven3