[Koha-cvs] CVS: koha/misc Install.pm,1.53,1.54 koha.upgrade,1.4,1.5

Paul POULAIN tipaul at users.sourceforge.net
Mon Oct 20 16:25:38 CEST 2003


Update of /cvsroot/koha/koha/misc
In directory sc8-pr-cvs1:/tmp/cvs-serv7969/misc

Modified Files:
	Install.pm koha.upgrade 
Log Message:
koha.upgrade bugfixes. Should work...

Index: Install.pm
===================================================================
RCS file: /cvsroot/koha/koha/misc/Install.pm,v
retrieving revision 1.53
retrieving revision 1.54
diff -C2 -r1.53 -r1.54
*** Install.pm	6 Oct 2003 09:10:39 -0000	1.53
--- Install.pm	20 Oct 2003 14:25:36 -0000	1.54
***************
*** 1772,1776 ****
      my %configfile;
  
!     open (KC, "<$etcdir/koha.conf");
      while (<KC>) {
       chomp;
--- 1772,1776 ----
      my %configfile;
  
!     open (KC, "</etc/koha.conf");
      while (<KC>) {
       chomp;
***************
*** 1788,1799 ****
      }
  
!     $intranetdir=$configfile{'intranetdir'};
!     $opacdir=$configfile{'opacdir'};
!     $kohaversion=$configfile{'kohaversion'};
!     $kohalogdir=$configfile{'kohalogdir'};
!     $database=$configfile{'database'};
!     $hostname=$configfile{'hostname'};
!     $user=$configfile{'user'};
!     $pass=$configfile{'pass'};
  }
  
--- 1788,1799 ----
      }
  
!     $::intranetdir=$configfile{'intranetdir'};
!     $::opacdir=$configfile{'opacdir'};
!     $::kohaversion=$configfile{'kohaversion'};
!     $::kohalogdir=$configfile{'kohalogdir'};
!     $::database=$configfile{'database'};
!     $::hostname=$configfile{'hostname'};
!     $::user=$configfile{'user'};
!     $::pass=$configfile{'pass'};
  }
  

Index: koha.upgrade
===================================================================
RCS file: /cvsroot/koha/koha/misc/koha.upgrade,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** koha.upgrade	22 Jan 2003 03:45:39 -0000	1.4
--- koha.upgrade	20 Oct 2003 14:25:36 -0000	1.5
***************
*** 8,27 ****
  
  if ($<) {
!     print "\n\nYou must run koha.upgrade as root.\n\n";
!     exit;
  }
  
  my $input;
- 
- 
  loadconfigfile();
  
  
- 
  ($::kohaversion) || ($::kohaversion='unknown version');
  $::newversion=`cat koha.version`;
  chomp $::newversion;
  if ($::newversion =~ /RC/) {
!     releasecandidatewarning();
  }
  
--- 8,24 ----
  
  if ($<) {
! 	print "\n\nYou must run koha.upgrade as root.\n\n";
! 	exit;
  }
  
  my $input;
  loadconfigfile();
  
  
  ($::kohaversion) || ($::kohaversion='unknown version');
  $::newversion=`cat koha.version`;
  chomp $::newversion;
  if ($::newversion =~ /RC/) {
! 	releasecandidatewarning();
  }
  
***************
*** 37,41 ****
  This upgrade script will make a backup copy of your files for you.
  
! Would you like to proceed?  ([Y]/N):  
  |;
  
--- 34,38 ----
  This upgrade script will make a backup copy of your files for you.
  
! Would you like to proceed?  (Y/[N]):
  |;
  
***************
*** 43,64 ****
  chomp $answer;
  
! if ($answer =~/n/i) {
!     print qq|
  
  Aborting.  Please re-run koha.upgrade when you are ready to upgrade Koha.
  |;
!     exit;
  } else {
!     print "Great! continuing upgrade... \n";
  };
  
- 
- 
  checkperlmodules();
  
- 
- 
  my $backupdir='/usr/local/koha/backups';
! print "Please specify a backup directory [$backupdir]: ";  
  
  $answer = <STDIN>;
--- 40,57 ----
  chomp $answer;
  
! unless ($answer =~/y/i) {
! 	print qq|
  
  Aborting.  Please re-run koha.upgrade when you are ready to upgrade Koha.
  |;
! 	exit;
  } else {
! 	print "Great! continuing upgrade... \n";
  };
  
  checkperlmodules();
  
  my $backupdir='/usr/local/koha/backups';
! print "Please specify a backup directory [$backupdir]: ";
  
  $answer = <STDIN>;
***************
*** 66,84 ****
  
  if ($answer) {
!     $backupdir=$answer;
  }
  
  if (! -e $backupdir) {
!    my $result=mkdir ($backupdir, oct(770));
!    if ($result==0) {
!        my @dirs = split(m#/#, $backupdir);
! 	my $checkdir='';
! 	foreach (@dirs) {
! 	    $checkdir.="$_/";
! 	    unless (-e "$checkdir") {
! 		mkdir($checkdir, 0775);
! 	    }
  	}
-    }
  }
  
--- 59,77 ----
  
  if ($answer) {
! 	$backupdir=$answer;
  }
  
  if (! -e $backupdir) {
! 	my $result=mkdir ($backupdir, oct(770));
! 	if ($result==0) {
! 		my @dirs = split(m#/#, $backupdir);
! 		my $checkdir='';
! 		foreach (@dirs) {
! 			$checkdir.="$_/";
! 			unless (-e "$checkdir") {
! 				mkdir($checkdir, 0775);
! 			}
! 		}
  	}
  }
  
***************
*** 92,106 ****
  
  foreach my $mysql (qw(/usr/local/mysql
!                       /opt/mysql
! 		    )) {
!     if ( -d $mysql ) {
! 	    $mysqldir=$mysql;
!     }
  }
  if (!$mysqldir){
!     $mysqldir='/usr';
! }
  
  
  
  my ($sec, $min, $hr, $day, $month, $year) = (localtime(time))[0,1,2,3,4,5];
--- 85,115 ----
  
  foreach my $mysql (qw(/usr/local/mysql
! 					/opt/mysql
! 					/usr
! 			)) {
! 	if ( -d $mysql  && -f "$mysql/bin/mysqladmin") {
! 		$mysqldir=$mysql;
! 	}
  }
  if (!$mysqldir){
! 	print "I don't see mysql in the usual places.\n";
! 	for (;;) {
! 		print "Where have you installed mysql? ";
! 		chomp($mysqldir = <STDIN>);
! 		last if -f "$mysqldir/bin/mysqladmin";
! 	print <<EOP;
  
+ I can't find it there either. If you compiled mysql yourself,
+ please give the value of --prefix when you ran configure.
  
+ The file mysqladmin should be in bin/mysqladmin under the directory that you
+ provide here.
+ 
+ EOP
+ #'
+ 	}
+ } else {
+ print "Doing backup\n";
+ }
  
  my ($sec, $min, $hr, $day, $month, $year) = (localtime(time))[0,1,2,3,4,5];
***************
*** 119,127 ****
  
  while (<MD>) {
!     (/insert into items /i) && ($itemcounter++);
!     (/insert into biblioitems /i) && ($biblioitemcounter++);
!     (/insert into biblio /i) && ($bibliocounter++);
!     (/insert into borrowers /i) && ($membercounter++);
!     print BF $_;
  }
  
--- 128,136 ----
  
  while (<MD>) {
! 	(/insert into items /i) && ($itemcounter++);
! 	(/insert into biblioitems /i) && ($biblioitemcounter++);
! 	(/insert into biblio /i) && ($bibliocounter++);
! 	(/insert into borrowers /i) && ($membercounter++);
! 	print BF $_;
  }
  
***************
*** 129,133 ****
  close MD;
  
- 
  my $filels=`ls -hl $backupdir/Koha.backup_$date`;
  chomp $filels;
--- 138,141 ----
***************
*** 194,198 ****
      $::opacdir='';
      while (!$::intranetdir) {
! 	print "Please specify the location of your INTRANET files: ";  
  
  	$answer = <STDIN>;
--- 202,206 ----
      $::opacdir='';
      while (!$::intranetdir) {
! 	print "Please specify the location of your INTRANET files: ";
  
  	$answer = <STDIN>;
***************
*** 272,275 ****
--- 280,284 ----
                        /etc/apache-ssl/conf/apache.conf
                        /etc/httpd/conf/httpd.conf
+                       /etc/httpd/conf/commonhttpd.conf
                        /etc/httpd/httpd.conf)) {
     if ( -f $httpdconf ) {
***************
*** 362,366 ****
  
  unless (-e "$::kohalogdir") {
!     my $result = mkdir 0770, "$::kohalogdir"; 
      if ($result==0) {
          my @dirs = split(m#/#, $::kohalogdir);
--- 371,375 ----
  
  unless (-e "$::kohalogdir") {
!     my $result = mkdir 0770, "$::kohalogdir";
      if ($result==0) {
          my @dirs = split(m#/#, $::kohalogdir);
***************
*** 382,387 ****
  
  
! open (KC, "/etc/koha.conf");
! my $kccontents='';
  my $kc;
  while (<KC>) {
--- 391,396 ----
  
  
! 
! my $kccontents='';open (KC, "/etc/koha.conf");
  my $kc;
  while (<KC>) {
***************
*** 455,461 ****
  and password from the /etc/koha.conf configuration file at any time.  Use the
  "Members" module to add passwords for other accounts and set their permissions.
- 
- [NOTE PERMISSIONS ARE NOT COMPLETED AS OF 1.2.3RC1.  Do not give passwords to
-  any patrons unless you want them to have full access to your intranet.]
  |;
  print "Press the <ENTER> key to continue: ";
--- 464,467 ----
***************
*** 469,473 ****
  = Koha Upgrade Completed =
  ==========================
! The Koha Upgrade is finished.  If you are upgrading from a version of Koha
  prior to 1.2.1, it is likely that you will have to modify your Apache
  configuration to point it to the new files.
--- 475,480 ----
  = Koha Upgrade Completed =
  ==========================
! The Koha Upgrade is finished.
! If you are upgrading from a version of Koha
  prior to 1.2.1, it is likely that you will have to modify your Apache
  configuration to point it to the new files.





More information about the Koha-cvs mailing list