iwasakims commented on code in PR #1043:
URL: https://github.com/apache/bigtop/pull/1043#discussion_r1004610011
##########
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:
I feel using readlink is a bit tricky here. How about using
`update-alternatives --set java java-1.8.0-openjdk.$(uname -m)` and
`update-alternatives --set javac java-1.8.0-openjdk.$(uname -m)`?
--
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]