yoda-mon commented on code in PR #1043:
URL: https://github.com/apache/bigtop/pull/1043#discussion_r1005239296


##########
bigtop_toolchain/manifests/installer.pp:
##########
@@ -24,6 +25,32 @@
   include bigtop_toolchain::user
   include bigtop_toolchain::renv
   include bigtop_toolchain::grpc
+  Class['bigtop_toolchain::jdk11']->Class['bigtop_toolchain::jdk']
+
+  case $::operatingsystem {
+    /Debian/: {
+      exec { 'ensure java 8 is set as default':
+        command => "update-java-alternatives --set adoptopenjdk-8*",
+        path    => ['/usr/sbin', '/usr/bin', '/bin'],
+        require => Class['bigtop_toolchain::jdk'],
+      }
+    }
+    /Ubuntu/: {
+      exec { 'ensure java 8 is set as default':
+        command => "update-java-alternatives --set java-1.8.0-openjdk*",
+        path    => ['/usr/sbin', '/usr/bin', '/bin'],
+        require => Class['bigtop_toolchain::jdk'],
+      }
+    }
+    /(CentOS|Fedora|RedHat)/: {
+      exec { 'ensure java 8 is set as default':
+        command => "update-alternatives --set java $(readlink -f 
/usr/lib/jvm/jre-1.8.0/bin/java) \
+                    && update-alternatives --set javac $(readlink -f 
/usr/lib/jvm/java-1.8.0/bin/javac)",

Review Comment:
   Thank you, I think it seems better to use `uname` because it woud be 
straightforward way. I will check and modify here.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to