Remove unused views
[releng/builder.git] / packer / provision / baseline.sh
index 5ffd231d112141dd370478cd4c5ab0167e2883cf..aae30d44b1e3be34881adf56e5646a8ef1fedde7 100644 (file)
@@ -7,6 +7,8 @@ set -xeu -o pipefail
 
 enable_service() {
     # Enable services for Ubuntu instances
+    # We purposely want to allow globbing to build the package array
+    # shellcheck disable=SC2206
     services=($@)
 
     for service in "${services[@]}"; do
@@ -72,6 +74,8 @@ ensure_ubuntu_install() {
     # On Ubuntu sometimes the mirrors fail to install a package. This wrapper
     # checks that a package is successfully installed before moving on.
 
+    # We purposely want to allow globbing to build the package array
+    # shellcheck disable=SC2206
     packages=($@)
 
     for pkg in "${packages[@]}"
@@ -176,7 +180,6 @@ EOF
     echo "---> Configuring OpenJDK"
     yum install -y 'java-*-openjdk-devel'
 
-    MANUAL_JAVA9=1
     FACTER_OS=$(/usr/bin/facter operatingsystem | tr '[:upper:]' '[:lower:]')
     FACTER_OSVER=$(/usr/bin/facter operatingsystemrelease)
     case "$FACTER_OS" in
@@ -188,11 +191,6 @@ EOF
                 alternatives --set java /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java
                 alternatives --set java_sdk_openjdk /usr/lib/jvm/java-1.7.0-openjdk.x86_64
             fi
-            # Java 9 is included in fedora-27
-            if [ "$FACTER_OSVER" -ge "27" ]
-            then
-                MANUAL_JAVA9=0
-            fi
         ;;
         redhat|centos)
             if [ "$(echo "$FACTER_OSVER" | cut -d'.' -f1)" -ge "7" ]
@@ -209,16 +207,6 @@ EOF
         ;;
     esac
 
-    # Not all distributions ship JDK9 in their repositories, download
-    # and install Oracle JDK9 for those which are not known to provide
-    # their own package
-    if [ "$MANUAL_JAVA9" -eq "1" ]
-    then
-        echo "---> Fetching and installing JDK9"
-        wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/9.0.1+11/jdk-9.0.1_linux-x64_bin.rpm"
-        yum localinstall -y jdk-9.0.1_linux-x64_bin.rpm
-    fi
-
     ########################
     # --- START LFTOOLS DEPS