File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 5252 # have to do this on ubuntu for version 7 because Ubuntu does # n/a now
5353 # not currently set jdk 7 as the default jvm on installation # n/a now
5454 require "fileutils"
55- arch = node [ 'kernel' ] [ 'machine' ] =~ /x86_64/ ? "x86_64" : "i386"
55+ # arch = node['kernel']['machine'] =~ /x86_64/ ? "x86_64" : "i386"
5656 Chef ::Log . debug ( "glob is #{ java_home_parent } /java*#{ version } *openjdk*" )
5757 jdk_home = Dir . glob ( "#{ java_home_parent } /java*#{ version } *openjdk{,[-\. ]#{ arch } }" ) [ 0 ]
5858 Chef ::Log . debug ( "jdk_home is #{ jdk_home } " )
6363 FileUtils . ln_sf jdk_home , java_home
6464
6565 cmd = Chef ::ShellOut . new (
66- %Q[ update-alternatives --install /usr/bin/java java $ {java_home}/bin/java 1;
67- update-alternatives --set java $ {java_home}/bin/java ]
66+ %Q[ update-alternatives --install /usr/bin/java java # {java_home } /bin/java 1;
67+ update-alternatives --set java # {java_home } /bin/java ]
6868 ) . run_command
6969 unless cmd . exitstatus == 0 or cmd . exitstatus == 2
7070 Chef ::Application . fatal! ( "Failed to update-alternatives for openjdk!" )
You can’t perform that action at this time.
0 commit comments