[Koha-cvs] CVS: koha installer.pl,1.2.2.28,1.2.2.29

Steve Tonnesen tonnesen at users.sourceforge.net
Tue Jun 25 20:46:37 CEST 2002


Update of /cvsroot/koha/koha
In directory usw-pr-cvs1:/tmp/cvs-serv17615

Modified Files:
      Tag: rel-1-2
	installer.pl 
Log Message:
Fix for Debian's apache which require the includes_module and env_module
modules to be loaded, and a couple of extra directives in the VirtualHost
sections to enable server parsing of .html files.


Index: installer.pl
===================================================================
RCS file: /cvsroot/koha/koha/installer.pl,v
retrieving revision 1.2.2.28
retrieving revision 1.2.2.29
diff -C2 -r1.2.2.28 -r1.2.2.29
*** installer.pl	25 Jun 2002 18:24:10 -0000	1.2.2.28
--- installer.pl	25 Jun 2002 18:46:35 -0000	1.2.2.29
***************
*** 358,361 ****
--- 358,392 ----
  
  |;
+ 
+ 
+ print "Checking for modules that need to be loaded...\n";
+ my $httpdconf='';
+ my $envmodule=0;
+ my $includesmodule=0;
+ open HC, $realhttpdconf;
+ while (<HC>) {
+     if (/^\s*#\s*LoadModule env_module /) {
+ 	s/^\s*#\s*//;
+ 	print "  Loading env_module in httpd.conf\n";
+ 	$envmodule=1;
+     }
+     if (/^\s*#\s*LoadModule includes_module /) {
+ 	s/^\s*#\s*//;
+ 	print "  Loading includes_module in httpd.conf\n";
+     }
+     if (/\s*LoadModule includes_module ) {
+ 	$includesmodule=1;
+     }
+     $httpdconf.=$_;
+ }
+ 
+ if ($envmodule || $includesmodule) {
+     system("mv -f $realhttpdconf $realhttpdconf\.prekoha");
+     open HC, ">$realhttpdconf";
+     print HC $httpdconf;
+     close HC;
+ }
+ 
+ 
  if (`grep 'VirtualHost $servername' $realhttpdconf`) {
      print qq|
***************
*** 371,374 ****
--- 402,410 ----
      print "\n";
  } else {
+     my $includesdirectives='';
+     if ($includesmodule) {
+ 	$includesdirectives.="Options +Includes\n";
+ 	$includesdirectives.="AddHandler server-parsed .html\n";
+     }
      open(SITE,">>$realhttpdconf") or warn "Insufficient priveleges to open $realhttpdconf for writing.\n";
      print SITE <<EOP
***************
*** 392,395 ****
--- 428,432 ----
     TransferLog $logfiledir/opac-access_log
     SetEnv PERL5LIB "$kohadir/modules"
+    $includesdirectives
  </VirtualHost>
  
***************
*** 403,406 ****
--- 440,444 ----
     TransferLog $logfiledir/koha-access_log
     SetEnv PERL5LIB "$kohadir/modules"
+    $includesdirectives
  </VirtualHost>
  
***************
*** 615,618 ****
--- 653,665 ----
  Congratulations ... your Koha installation is almost complete!
  The final step is to restart your webserver.
+ 
+ You will be able to connect to your Librarian interface at:
+ 
+    http://$servername\:$kohaport/
+ 
+ and the OPAC interface at :
+ 
+    http://$servername\:$opacport/
+ 
  
  Be sure to read the INSTALL, and Hints files. 





More information about the Koha-cvs mailing list