Ignore:
Timestamp:
2016-06-30T18:46:47+12:00 (8 years ago)
Author:
ak19
Message:
  1. activate.pl modified to allow incremental-building with a manifest file. 2. servercontrol.pm modified to allow activating a collection when the gs3-server is set to use another servlet. The halftone-library servlet returns the ping succeeded message nested in a different element than the default library servlet. So the code's no longer getting the element first. Saves extra effort in the code anyway to do one regex instead of 3.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/servercontrol.pm

    r30561 r30596  
    136136    # - with single quotes around it for linux for the cmd to run in bash subshell
    137137    # - with a ^ before it on windows for the cmd to run in a DOS prompt subshell
    138     # - or the entire wget command should be nested double quotes (single quotes don't work on windows)
     138    # - or the entire wget command should be nested in double quotes (single quotes don't work on windows)
    139139    my $wgetCommand = $command;
    140140
     
    149149    $wgetCommand = "\"$wget_file_path\" --output-document=- -T 5 -t 1 \"$library_url$wgetCommand\" 2>&1";   
    150150    #$wgetCommand = "\"$wget_file_path\" --spider -T 5 -t 1 \"$library_url$wgetCommand\" 2>&1"; # won't save page
     151    ##print STDERR "@@@@ $wgetCommand\n";
     152
    151153    my $response_content = `$wgetCommand`;
    152154    my $response_code = undef;
     
    184186        # check the page content is as expected
    185187        my $resultstr = $response_content;
    186         $resultstr =~ s@.*gs_content\"\>@@s;       
    187         $resultstr =~ s@</div>.*@@s;
     188        #$resultstr =~ s@.*gs_content\"\>@@s;   ## only true for default library servlet   
     189        #$resultstr =~ s@</div>.*@@s;
    188190        if($resultstr =~ m/$check_message_against_regex/) {
    189191        $self->print_msg(" Response as expected.\n", 3);
     
    278280    my $expected_error_code = 500;
    279281   
    280     $self->print_msg("*** COMMAND WAS: |$command|***\n", 4);
     282    $self->print_msg("*** COMMAND WAS: |$command| ***\n", 4);
    281283   
    282284    return $self->config($command, $check_responsemsg_against_regex, $expected_error_code, $silent);
Note: See TracChangeset for help on using the changeset viewer.