[Koha-cvs] CVS: koha installer.pl,1.2.2.4,1.2.2.5

Mike Mylonas dragon28 at users.sourceforge.net
Sat May 11 07:20:41 CEST 2002


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

Modified Files:
      Tag: rel-1-2
	installer.pl 
Log Message:
Now will create koha.conf from scratch.

Index: installer.pl
===================================================================
RCS file: /cvsroot/koha/koha/installer.pl,v
retrieving revision 1.2.2.4
retrieving revision 1.2.2.5
diff -C2 -r1.2.2.4 -r1.2.2.5
*** installer.pl	10 May 2002 11:09:00 -0000	1.2.2.4
--- installer.pl	11 May 2002 05:20:38 -0000	1.2.2.5
***************
*** 5,9 ****
  
  system('clear');
! print <<EOM;
  **********************************
  * Welcome to the Koha Installer  *
--- 5,9 ----
  
  system('clear');
! print qq|
  **********************************
  * Welcome to the Koha Installer  *
***************
*** 23,27 ****
  Are Apache, Perl, and a database from the list above installed 
  on this system? (Y/[N]):
! EOM
  
  my $answer = <STDIN>;
--- 23,27 ----
  Are Apache, Perl, and a database from the list above installed 
  on this system? (Y/[N]):
! |;
  
  my $answer = <STDIN>;
***************
*** 31,35 ****
  	print "Great! continuing setup... \n";
      } else {
!     print <<EOM;
  This installer currently does not support an completely automated 
  setup.
--- 31,35 ----
  	print "Great! continuing setup... \n";
      } else {
!     print qq|
  This installer currently does not support an completely automated 
  setup.
***************
*** 37,41 ****
  Please be sure to read the documentation, or visit the Koha website 
  at http://www.koha.org for more information.
! EOM
      exit;
  };
--- 37,41 ----
  Please be sure to read the documentation, or visit the Koha website 
  at http://www.koha.org for more information.
! |;
      exit;
  };
***************
*** 107,114 ****
  #    system("grant all privileges on Koha.* to koha at localhost identified by 'kohapassword'; ");
  #} else {
! #    print <<EOM;
  #You will need to use the MySQL database system for your application.
  #The installer currently does not support an automated setup with this database.
! #EOM
  #  };
  
--- 107,114 ----
  #    system("grant all privileges on Koha.* to koha at localhost identified by 'kohapassword'; ");
  #} else {
! #    print qq|
  #You will need to use the MySQL database system for your application.
  #The installer currently does not support an automated setup with this database.
! #|;
  #  };
  
***************
*** 123,164 ****
  #KOHA conf
  #
! print <<EOM;
! Koha uses a small configuration file that is usually placed in 
! the /etc/ directory (although technically you could place it
! anywhere you wish).
! 
! Checking to see if koha.conf already exists...
! EOM
! 
! # Check to see if the koha.conf file exists.
! # and what its contents may be.
! #
! #
! my($file) = "/etc/koha.conf";
! my($content);
! open(FILE, "<", "$file") or die "cannot open $file for reading : $!";
! $content = <FILE>;
! print "\n";
! print "Contents of koha.conf ...\n";
! print $content;
! print <FILE>;
! close (FILE);
  
  
! # FIXME
! # is there a reason we don't just create the conf file here?
! # We could ask where the file is to be kept, update our 
! # scripts to look for it there, and just write out to the
! # new file (possibly allowing the installer.pl user to edit the
! # file first).
! #
! #print <<EOM;
! #You will need to add the following to the Koha configuration file\n";
! #database=Koha\n";
! #hostname=localhost\n";
! #user=Koha\n";
! #pass=$password\n";
! #includes=/usr/local/www/koha/htdocs/includes\n";
! #EOM
  
  
--- 123,222 ----
  #KOHA conf
  #
! print qq|
! Koha uses a small configuration file that is usually placed in your
! /etc/ files directory (although you can technically place
! it anywhere you wish).
! 
! Please enter the full path to your configuration files
! directory (the default Koha conf file is "koha.conf").
! The path is usually something like /etc/ by default.  The
! configuration file, will be created here.
! |;
! 
! #Get the path to the koha.conf directory
! my $conf_path;
! my $dbname;
! my $hostname;
! my $user;
! my $pass;
! do {
! 	print "Enter path:";
! 	chomp($conf_path = <STDIN>);
! 	print "$conf_path is not a directory.\n" if !-d $conf_path;
! } until -d $conf_path;
  
  
! print "\n";
! print "\n";
! print qq|
! Please provide the name of the mysql database for koha. 
! This is normally "Koha".
! |;
! 
! #Get the database name
! do {
! 	print "Enter database name:";
! 	chomp($dbname = <STDIN>);
! };
! 
! 
! print "\n";
! print "\n";
! print qq|
! Please provide the hostname for mysql.  Unless the database is located 
! on another machine this is likely to be "localhost".
! |;
! 
! #Get the hostname for the database
! do {
! 	print "Enter hostname:";
! 	chomp($hostname = <STDIN>);
! };
! 
! 
! print "\n";
! print "\n";
! print qq|
! Please provide the name of the user, who has full administrative 
! rights to the $dbname database, when authenicating from $hostname.
! |;
! 
! #Get the username for the database
! do {
! 	print "Enter username:";
! 	chomp($user = <STDIN>);
! };
! 
! 
! print "\n";
! print "\n";
! print qq|
! Please provide the password for the user $user.
! |;
! 
! #Get the password for the database user
! do {
! 	print "Enter password:";
! 	chomp($pass = <STDIN>);
! };
! 
! 
! #Create the configuration file
! open(SITES,">$conf_path/koha.conf") or die "Couldn't create file
! at $conf_path.  Must have write capability.\n";
! #print SITES qq|\database=$dbname\n|;
! #print SITES qq|\hostname=$hostname\n|;
! #print SITES qq|\user=$user\n|;
! #print SITES qq|\password=$pass\n|;
! print SITES <<EOP
! database=$dbname
! hostname=$hostname
! user=$user
! password=$pass
! EOP
! ;
! close(SITES);
! 
! print "Successfully created configuration file.\n";
  
  





More information about the Koha-cvs mailing list