Changeset 23184


Ignore:
Timestamp:
2010-10-20T13:32:50+13:00 (12 years ago)
Author:
davidb
Message:

Updating of PATH changed to prepend (rather than append) so new environment for Greenstone found ahead of any older settting. The latter happens with the main NZDL web server that sets GSDLHOME we now have the situation that we run more than one Greenstone install from within the same Apache installation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/cgi-bin/gsdlCGI.pm

    r23088 r23184  
    477477   
    478478    my $gsdl_bin_script = &util::filename_cat($gsdlhome,"bin","script");
    479     &util::envvar_append("PATH",$gsdl_bin_script);
     479    &util::envvar_prepend("PATH",$gsdl_bin_script);
    480480   
    481481    my $gsdl_bin_os = &util::filename_cat($gsdlhome,"bin",$gsdlos);
    482     &util::envvar_append("PATH",$gsdl_bin_os);
     482    &util::envvar_prepend("PATH",$gsdl_bin_os);
    483483   
    484484    # If the "perlpath" property is set in the gsdl(3)site.cfg config file, it is
     
    517517    if(defined $java_home) {
    518518    $ENV{'JAVA_HOME'} = $java_home;
     519    }
     520
     521    # Process any extension setup.pl files
     522    my $ext_home = &util::filename_cat($gsdlhome,"ext");
     523
     524    if (opendir(EXTDIR,$ext_home) ) {
     525    my @pot_ext_dir = grep { $_ !~ m/^\./ } readdir(EXTDIR);
     526
     527    closedir(EXTXDIR);
     528
     529    foreach my $ed (@pot_ext_dir) {
     530        my $full_ext_dir = &util::filename_cat($ext_home,$ed);
     531        if (-d $full_ext_dir) {
     532        my $full_inc_file = &util::filename_cat($full_ext_dir,
     533                            "$ed-setup.pl");
     534        if (-f $full_inc_file) {
     535
     536            my $store_cwd = Cwd::cwd();
     537
     538            chdir($full_ext_dir);
     539            require "./$ed-setup.pl";
     540            chdir($store_cwd);
     541        }
     542        }
     543    }
    519544    }
    520545
Note: See TracChangeset for help on using the changeset viewer.