[Koha-cvs] CVS: koha/misc Install.pm,1.88,1.88.2.1

MJ Ray slef at users.sourceforge.net
Mon Jan 24 14:25:06 CET 2005


Update of /cvsroot/koha/koha/misc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24709

Modified Files:
      Tag: rel_2_2
	Install.pm 
Log Message:
porting changes from 2.0.x

Index: Install.pm
===================================================================
RCS file: /cvsroot/koha/koha/misc/Install.pm,v
retrieving revision 1.88
retrieving revision 1.88.2.1
diff -C2 -r1.88 -r1.88.2.1
*** Install.pm	5 Jan 2005 14:31:17 -0000	1.88
--- Install.pm	24 Jan 2005 13:24:51 -0000	1.88.2.1
***************
*** 3,7 ****
  
  # Copyright 2000-2002 Katipo Communications
! # Contains parts Copyright 2003 MJ Ray
  #
  # This file is part of Koha.
--- 3,7 ----
  
  # Copyright 2000-2002 Katipo Communications
! # Contains parts Copyright 2003-4 MJ Ray
  #
  # This file is part of Koha.
***************
*** 27,33 ****
  #MJR: everyone will have these modules, right?
  # They look like part of perl core to me
! use Term::Cap;
  use Term::ANSIColor qw(:constants);
  use Text::Wrap;
  require Exporter;
  
--- 27,34 ----
  #MJR: everyone will have these modules, right?
  # They look like part of perl core to me
! #use Term::Cap;
  use Term::ANSIColor qw(:constants);
  use Text::Wrap;
+ use File::Temp qw/ :mktemp /;
  require Exporter;
  
***************
*** 61,64 ****
--- 62,66 ----
  		&getmessage
  		&showmessage
+ 		&completeupgrade
  		&releasecandidatewarning
  		&getinstallationdirectories
***************
*** 86,90 ****
  use vars qw( $etcdir );				# set in installer.pl, usu. /etc
  use vars qw( $intranetdir $opacdir $kohalogdir );
! use vars qw( $realhttpdconf $httpduser );
  use vars qw( $servername $svr_admin $opacport $intranetport );
  use vars qw( $mysqldir );
--- 88,92 ----
  use vars qw( $etcdir );				# set in installer.pl, usu. /etc
  use vars qw( $intranetdir $opacdir $kohalogdir );
! use vars qw( $realhttpdconf $httpduser $httpdgroup );
  use vars qw( $servername $svr_admin $opacport $intranetport );
  use vars qw( $mysqldir );
***************
*** 107,114 ****
  =cut
  
! my $termios = POSIX::Termios->new();
! $termios->getattr();
! my $terminal = Term::Cap->Tgetent({OSPEED=>$termios->getospeed()});
! my $clear_string = "\n";
  
  sub heading ($) {
--- 109,116 ----
  =cut
  
! #my $termios = POSIX::Termios->new();
! #$termios->getattr();
! #my $terminal = Term::Cap->Tgetent({OSPEED=>$termios->getospeed()});
! my $clear_string = "\n\n"; #MJR: was $terminal->Tputs('cl');
  
  sub heading ($) {
***************
*** 119,123 ****
  
  my $mycnf = $ENV{HOME}."/.my.cnf";
! my $mytmpcnf = `mktemp my.cnf.koha.XXXXXX`;
  chomp($mytmpcnf);
  
--- 121,125 ----
  
  my $mycnf = $ENV{HOME}."/.my.cnf";
! my $mytmpcnf = mktemp("my.cnf.koha.XXXXXX");
  chomp($mytmpcnf);
  
***************
*** 127,138 ****
     heading('Welcome to the Koha Installer') . qq|
  This program will ask some questions and try to install koha for you.
! You need to know: 
! * where most koha files should be stored (you can set the prefix environment variable for this);
! * the username and password of a mysql superuser; 
! * Details of your library setup. 
! * Details of your Apache setup.
  
  If you want to install the Koha configuration files somewhere other than
! /etc (for multiple Koha versions on one system, for example), you should
  set the etcdir environment variable.  Please look at your manuals for
  details of how to set that.
--- 129,139 ----
     heading('Welcome to the Koha Installer') . qq|
  This program will ask some questions and try to install koha for you.
! You need to know: where most koha files should be stored (you can set
! the prefix environment variable for this); the username and password of
! a mysql superuser; and details of your library setup.  You may also need
! to know details of your Apache setup.
  
  If you want to install the Koha configuration files somewhere other than
! /etc (for installing not as root, or to have many Kohas on one system, for example), you should
  set the etcdir environment variable.  Please look at your manuals for
  details of how to set that.
***************
*** 149,153 ****
  $messages->{'WelcomeToUpgrader'}->{en} =
     heading('Welcome to the Koha Upgrader') . qq|
! You are attempting to upgrade to Koha %s.
  
  We recommend that you do a complete backup of all your files before upgrading.
--- 150,154 ----
  $messages->{'WelcomeToUpgrader'}->{en} =
     heading('Welcome to the Koha Upgrader') . qq|
! You are attempting to upgrade from Koha %s to Koha %s.
  
  We recommend that you do a complete backup of all your files before upgrading.
***************
*** 262,269 ****
--- 263,274 ----
  $messages->{'Completed'}->{en} = heading('INSTALLATION COMPLETE') . qq|
  Congratulations ... your Koha installation is complete!
+ 
  You will be able to connect to your Librarian interface at:
+ 
     http://%s\:%s/
+ 
     use the koha admin mysql login and password to connect to this interface.
  and the OPAC interface at:
+ 
     http://%s\:%s/
     
***************
*** 283,286 ****
--- 288,305 ----
  
  #'
+ 
+ =item completeupgrade
+ 
+    completeupgrade
+ 
+ Display a message describing what may need changing in httpd.conf
+ and any other instructions
+ 
+ =cut
+ 
+ sub completeupgrade {
+ 	showmessage(getmessage('UpgradeCompleted',[$intranetdir,$intranetdir,$intranetdir,$opacdir,$opacdir,$intranetdir]),'PressEnter');
+ }
+ 
  sub releasecandidatewarning {
      my $message=getmessage('ReleaseCandidateWarning', [$newversion, $newversion]);
***************
*** 290,294 ****
  	print getmessage('continuing');
      } else {
! 	my $message=getmessage('WatchForReleaseAnnouncements','');
  	print $message."\n";
  	exit;
--- 309,313 ----
  	print getmessage('continuing');
      } else {
! 	my $message=getmessage('WatchForReleaseAnnouncements');
  	print $message."\n";
  	exit;
***************
*** 375,378 ****
--- 394,398 ----
  Sets the sysconfdir, normally /etc.
  This should be an absolute path; a trailing / is not required.
+ Must be writeable, else we die.
  
  =cut
***************
*** 380,383 ****
--- 400,404 ----
  sub setetcdir ($) {
      ($etcdir) = @_;
+     if (! ((-d $etcdir) && (-w $etcdir))) { die("Cannot write to $etcdir! Please set the etcdir environment variable to a writeable directory.\nFailed"); }
  }
  
***************
*** 933,937 ****
  sub getinstallationdirectories {
  	my ($auto_install) = @_;
! 	if (!$ENV{prefix}) { $ENV{prefix} = "/usr/local"; } #"
      $opacdir = $ENV{prefix}.'/koha/opac';
      $intranetdir = $ENV{prefix}.'/koha/intranet';
--- 954,958 ----
  sub getinstallationdirectories {
  	my ($auto_install) = @_;
! 	if (!$ENV{prefix}) { $ENV{prefix} = "/usr/local"; }
      $opacdir = $ENV{prefix}.'/koha/opac';
      $intranetdir = $ENV{prefix}.'/koha/intranet';
***************
*** 1026,1030 ****
  			  /usr
  			  )) {
!        if ( -d $mysql  && -f "$mysql/bin/mysqladmin") { #"
  	    $mysqldir=$mysql;
         }
--- 1047,1051 ----
  			  /usr
  			  )) {
!        if ( -d $mysql  && -f "$mysql/bin/mysqladmin") {
  	    $mysqldir=$mysql;
         }
***************
*** 1303,1307 ****
--- 1324,1330 ----
  NOTE: You will need to add lines to your main httpd.conf to
  include %s/koha-httpd.conf
+ (using the Include directive)
  and to make sure it is listening on the right ports
+ and host names
  (using the Listen directive).
  
***************
*** 1463,1466 ****
--- 1486,1497 ----
  	print SITE <<EOP
  
+ # Koha 2.2 Apache Virtual Host Config File
+ #
+ # Please include this file in your apache configuration.
+ # The best way to do that depends on your site setup.
+ # Some like an Include adding to /etc/apache/httpd.conf
+ # and some prefer a symlink to this file from some dir.
+ # Please refer to your system manuals.
+ 
  # Ports to listen to for Koha
  # uncomment these if they aren't already in main httpd.conf
***************
*** 1469,1472 ****
--- 1500,1505 ----
  
  # NameVirtualHost is used by one of the optional configurations detailed below
+ # Please make sure this line is correct before uncommenting.
+ # See http://httpd.apache.org/docs/vhosts/ for some guides.
  
  #NameVirtualHost 11.22.33.44
***************
*** 1478,1481 ****
--- 1511,1515 ----
     ServerName $servername
     ScriptAlias /cgi-bin/koha/ $opacdir/cgi-bin/
+    Redirect permanent index.html http://$servername\:$opacport/cgi-bin/koha/opac-main.pl
     ErrorLog $logfiledir/opac-error_log
     TransferLog $logfiledir/opac-access_log
***************
*** 1491,1494 ****
--- 1525,1529 ----
     ServerName $servername
     ScriptAlias /cgi-bin/koha/ "$intranetdir/cgi-bin/"
+    Redirect permanent index.html http://$servername\:$intranetport/cgi-bin/koha/mainpage.pl
     ErrorLog $logfiledir/koha-error_log
     TransferLog $logfiledir/koha-access_log





More information about the Koha-cvs mailing list