[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/misc Install.pm,1.18,1.19 installer.pl,1.10,1.11
From: |
Ambrose Li |
Subject: |
[Koha-cvs] CVS: koha/misc Install.pm,1.18,1.19 installer.pl,1.10,1.11 |
Date: |
Sat, 25 Jan 2003 09:10:48 -0800 |
Update of /cvsroot/koha/koha/misc
In directory sc8-pr-cvs1:/tmp/cvs-serv9081/misc
Modified Files:
Install.pm installer.pl
Log Message:
Moved knowledge of "koha.conf.tmp" to the Install.pm
POD updates
Index: Install.pm
===================================================================
RCS file: /cvsroot/koha/koha/misc/Install.pm,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -r1.18 -r1.19
*** Install.pm 25 Jan 2003 16:33:51 -0000 1.18
--- Install.pm 25 Jan 2003 17:10:46 -0000 1.19
***************
*** 62,65 ****
--- 62,66 ----
&populatedatabase
&restartapache
+ &finalizeconfigfile
&loadconfigfile
);
***************
*** 92,96 ****
This reduces the likelihood of pod2man(1) etc. misinterpreting
! a line of equal signs as POD directives.
=cut
--- 93,97 ----
This reduces the likelihood of pod2man(1) etc. misinterpreting
! a line of equal signs as illegal POD directives.
=cut
***************
*** 441,445 ****
The first two arguments, the message and the response type,
are mandatory. The message must be the actual string to
! display. The caller is responsible for calling getmessage if
required.
--- 442,446 ----
The first two arguments, the message and the response type,
are mandatory. The message must be the actual string to
! display; the caller is responsible for calling getmessage if
required.
***************
*** 461,465 ****
addresses. What it does is to restrict the returned value to a
string that is looks reasonably likely to be an email address
! in the "real world".
If a response type other than "none" or "PressEnter" is
--- 462,467 ----
addresses. What it does is to restrict the returned value to a
string that is looks reasonably likely to be an email address
! in the "real world", given the premise that the user is trying
! to enter a real email address.
If a response type other than "none" or "PressEnter" is
***************
*** 482,486 ****
FIXME: A response type of "yn" should allow the user to specify
! "y" or "n" in either upercase or lowercase.
FIXME: If the response type is "free", the user cannot specify
--- 484,490 ----
FIXME: A response type of "yn" should allow the user to specify
! "y" or "n" in either uppercase or lowercase. This is especially
! true since the message shown to the user will contain uppercase
! characters as valid choices.
FIXME: If the response type is "free", the user cannot specify
***************
*** 808,811 ****
--- 812,817 ----
Please provide a good password for the user %s.
+ This password will also be used to access Koha's INTRANET interface.
+
Database Password: |;
***************
*** 1564,1567 ****
--- 1570,1610 ----
}
+
+ =item finalizeconfigfile
+
+ finalizeconfigfile;
+
+ This function must be called when the installation is complete,
+ to rename the koha.conf.tmp file to koha.conf.
+
+ Currently, failure to rename the file results only in a warning.
+
+ =cut
+
+ sub finalizeconfigfile {
+ rename "$etcdir/koha.conf.tmp", "$etcdir/koha.conf"
+ || showmessage(<<EOF, 'PressEnter', undef, 1);
+ An unexpected error, $!, occurred
+ while the Koha config file is being saved to its final location,
+ $etcdir/koha.conf.
+
+ Couldn't rename file at $etcdir. Must have write capability.
+
+ Press Enter to continue.
+ EOF
+ }
+
+
+ =item loadconfigfile
+
+ loadconfigfile
+
+ Open the existing koha.conf file and get its values,
+ saving the values to some global variables.
+
+ If the existing koha.conf file cannot be opened for any reason,
+ the file is silently ignored.
+
+ =cut
sub loadconfigfile {
Index: installer.pl
===================================================================
RCS file: /cvsroot/koha/koha/misc/installer.pl,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** installer.pl 25 Jan 2003 09:35:08 -0000 1.10
--- installer.pl 25 Jan 2003 17:10:46 -0000 1.11
***************
*** 11,15 ****
my $domainname = `hostname`; # Note: must not have any arguments (portability)
! $domainname = $domainname =~ /^[^\.]+\.(.*)$/? $1: undef;
Install::setdomainname $domainname;
--- 11,26 ----
my $domainname = `hostname`; # Note: must not have any arguments (portability)
! if ($domainname =~ /^[^\s\.]+\.([-a-z0-9\.]+)$/) {
! $domainname = $1;
! } else {
! undef $domainname;
! if (open(INPUT, "</etc/resolv.conf")) {
! while (<INPUT>) {
! $domainname = $1 if /^domain\s+([-a-z0-9\.]+)\s*$/i;
! last if defined $domainname;
! }
! close INPUT;
! }
! }
Install::setdomainname $domainname;
***************
*** 99,112 ****
updatedatabase();
- #updatemarc();
-
populatedatabase();
! restartapache();
- # Installation is complete. Rename the koha.conf.tmp file
- rename "$etcdir/koha.conf.tmp", "$etcdir/koha.conf" || warn "Couldn't rename
file at $etcdir. Must have write capability.\n";
--- 110,120 ----
updatedatabase();
populatedatabase();
! finalizeconfigfile();
+ restartapache();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/misc Install.pm,1.18,1.19 installer.pl,1.10,1.11,
Ambrose Li <=