Changeset 13385


Ignore:
Timestamp:
2006-12-01T10:21:30+13:00 (17 years ago)
Author:
mdewsnip
Message:

Added some extra debugging information to the check-installation command.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/cgi-bin/gliserver.pl

    r13329 r13385  
    220220    my ($gsdl_cgi) = @_;
    221221
     222    my $installation_ok = 1;
     223    my $installation_status = "";
     224
    222225    # Check that Java is installed and accessible
    223226    my $java = $gsdl_cgi->get_java_path();
     
    226229    my $java_status = $?;
    227230    if ($java_status < 0) {
    228     $gsdl_cgi->generate_error("Java failed -- do you have the Java run-time installed?\n" . $gsdl_cgi->check_java_home());
    229     }
    230 
    231     $gsdl_cgi->generate_ok_message("Java found: $java_output\nInstallation OK!");
     231    # The Java command failed
     232    $installation_status = "Java failed -- do you have the Java run-time installed?\n" . $gsdl_cgi->check_java_home() . "\n";
     233    $installation_ok = 0;
     234    }
     235    else {
     236    $installation_status = "Java found: $java_output";
     237    }
     238
     239    # Show the values of some important environment variables
     240    $installation_status .= "\n";
     241    $installation_status .= "GSDLHOME: " . $ENV{'GSDLHOME'} . "\n";
     242    $installation_status .= "GSDLOS: " . $ENV{'GSDLOS'} . "\n";
     243    $installation_status .= "PATH: " . $ENV{'PATH'} . "\n";
     244
     245    if ($installation_ok) {
     246    $gsdl_cgi->generate_ok_message($installation_status . "\nInstallation OK!");
     247    }
     248    else {
     249    $gsdl_cgi->generate_error($installation_status);
     250    }
    232251}
    233252
Note: See TracChangeset for help on using the changeset viewer.