Changeset 15960

Show
Ignore:
Timestamp:
11.06.2008 20:43:46 (12 years ago)
Author:
ak19
Message:

Processes new variable javahome that has been simultaneously introduced into gsdl3site.cfg which this uses to set the JAVA_HOME environment variable, so that the doing a gliserver check-installation in the browser will no longer fail with JAVA_HOME not set.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • greenstone3/trunk/web/WEB-INF/cgi/gsdlCGI4gs3.pm

    r14368 r15960  
    216216} 
    217217 
     218sub get_java_home { 
     219    my $self = shift @_; 
     220     
     221    if (defined $self->{'javahome'}) { 
     222    return $self->{'javahome'}; 
     223    } 
     224 
     225    my $javahome = $self->get_config_info("javahome"); 
     226 
     227    $javahome =~ s/(\/|\\)$//; # remove trailing slash 
     228 
     229    $self->{'javahome'} = $javahome; 
     230 
     231    return $javahome; 
     232} 
     233 
    218234sub get_gsdl_os { 
    219235    my $self = shift @_; 
     
    242258    my $gsdlhome = $self->get_gsdl_home(); 
    243259    my $gsdlos = $self->get_gsdl_os(); 
     260    my $javahome = $self->get_java_home(); 
    244261 
    245262    $ENV{'GSDL3SRCHOME'} = $gsdl3srchome; 
    246263    $ENV{'GSDLHOME'} = $gsdlhome; 
    247264    $ENV{'GSDLOS'} = $gsdlos; 
     265    $ENV{'JAVA_HOME'} = $javahome; 
     266 
    248267    require "$gsdlhome/perllib/util.pm"; 
    249268 
     
    345364} 
    346365 
     366 
    3473671; 
    348368