[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha buildrelease,1.1.2.16,1.1.2.17 installer.pl,1.2.2.5
From: |
Steve Tonnesen |
Subject: |
[Koha-cvs] CVS: koha buildrelease,1.1.2.16,1.1.2.17 installer.pl,1.2.2.53,1.2.2.54 koha.upgrade,1.1.2.9,1.1.2.10 |
Date: |
Tue, 09 Jul 2002 12:39:25 -0700 |
Update of /cvsroot/koha/koha
In directory usw-pr-cvs1:/tmp/cvs-serv27198
Modified Files:
Tag: rel-1-2
buildrelease installer.pl koha.upgrade
Log Message:
koha.upgrade wasn't rewriting the variables in the z3950 daemon scripts.
Modified installer.pl to store the $kohalogdir variable in /etc/koha.conf
Index: buildrelease
===================================================================
RCS file: /cvsroot/koha/koha/buildrelease,v
retrieving revision 1.1.2.16
retrieving revision 1.1.2.17
diff -C2 -r1.1.2.16 -r1.1.2.17
*** buildrelease 9 Jul 2002 17:57:43 -0000 1.1.2.16
--- buildrelease 9 Jul 2002 19:39:23 -0000 1.1.2.17
***************
*** 281,285 ****
system("find $rootdir -name .#* -exec rm -rf \\{\\} \\; 2>/dev/null");
! if (-e "/root/docs") {
print "Copying docs folder from /root/docs...";
system("cp -r /root/docs/* $rootdir/docs/");
--- 281,285 ----
system("find $rootdir -name .#* -exec rm -rf \\{\\} \\; 2>/dev/null");
! if (-e "/root/docs/manual") {
print "Copying docs folder from /root/docs...";
system("cp -r /root/docs/* $rootdir/docs/");
Index: installer.pl
===================================================================
RCS file: /cvsroot/koha/koha/installer.pl,v
retrieving revision 1.2.2.53
retrieving revision 1.2.2.54
diff -C2 -r1.2.2.53 -r1.2.2.54
*** installer.pl 9 Jul 2002 17:58:56 -0000 1.2.2.53
--- installer.pl 9 Jul 2002 19:39:23 -0000 1.2.2.54
***************
*** 328,331 ****
--- 328,332 ----
intranetdir=$kohadir
opacdir=$opacdir
+ kohalogdir=$kohalogdir
kohaversion=$kohaversion
httpduser=$httpduser
***************
*** 585,588 ****
--- 586,616 ----
}
+ print qq|
+
+ SETTING UP Z39.50 DAEMON
+ ========================
+ |;
+
+ my $kohalogdir='/var/log/koha';
+ print "Directory for logging by Z39.50 daemon [$kohalogdir]: ";
+ chomp($input = <STDIN>);
+ if ($input) {
+ $kohalogdir=$input;
+ }
+
+ unless (-e "$kohalogdir") {
+ my $result = mkdir 0770, "$kohalogdir";
+ if ($result==0) {
+ my @dirs = split(m#/#, $kohalogdir);
+ my $checkdir='';
+ foreach (@dirs) {
+ $checkdir.="$_/";
+ unless (-e "$checkdir") {
+ mkdir($checkdir, 0775);
+ }
+ }
+ }
+ }
+
#
# Setup the modules directory
***************
*** 816,845 ****
- print qq|
-
- SETTING UP Z39.50 DAEMON
- ========================
- |;
-
- my $kohalogdir='/var/log/koha';
- print "Directory for logging by Z39.50 daemon [$kohalogdir]: ";
- chomp($input = <STDIN>);
- if ($input) {
- $kohalogdir=$input;
- }
-
- unless (-e "$kohalogdir") {
- my $result = mkdir 0770, "$kohalogdir";
- if ($result==0) {
- my @dirs = split(m#/#, $kohalogdir);
- my $checkdir='';
- foreach (@dirs) {
- $checkdir.="$_/";
- unless (-e "$checkdir") {
- mkdir($checkdir, 0775);
- }
- }
- }
- }
chmod 0770, $kohalogdir;
chown((getpwnam($httpduser)) [2,3], $kohalogdir) or warn "can't chown
$kohalogdir: $!";
--- 844,847 ----
Index: koha.upgrade
===================================================================
RCS file: /cvsroot/koha/koha/koha.upgrade,v
retrieving revision 1.1.2.9
retrieving revision 1.1.2.10
diff -C2 -r1.1.2.9 -r1.1.2.10
*** koha.upgrade 9 Jul 2002 19:03:19 -0000 1.1.2.9
--- koha.upgrade 9 Jul 2002 19:39:23 -0000 1.1.2.10
***************
*** 4,7 ****
--- 4,8 ----
use strict; # please develop with the strict pragma
+
if ($<) {
print "\n\nYou must run koha.upgrade as root.\n\n";
***************
*** 9,13 ****
--- 10,17 ----
}
+ my $input;
+
my %configfile;
+
open (KC, "/etc/koha.conf");
while (<KC>) {
***************
*** 29,32 ****
--- 33,37 ----
my $opacdir=$configfile{'opacdir'};
my $kohaversion=$configfile{'kohaversion'};
+ my $kohalogdir=$configfile{'kohalogdir'};
my $database=$configfile{'database'};
my $hostname=$configfile{'hostname'};
***************
*** 118,122 ****
open (MD, "$mysqldir/bin/mysqldump --user=$user --password=$pass
--host=$hostname $database|");
! open BF, ">$backupdir/Koha.backup_$date";
my $itemcounter=0;
--- 123,127 ----
open (MD, "$mysqldir/bin/mysqldump --user=$user --password=$pass
--host=$hostname $database|");
! (open BF, ">$backupdir/Koha.backup_$date") || (die "Error opening up backup
file $backupdir/Koha.backup_$date: $!\n");
my $itemcounter=0;
***************
*** 297,301 ****
|;
print "What is your Apache user? ";
- my $input;
chomp($input = <STDIN>);
--- 302,305 ----
***************
*** 325,328 ****
--- 329,400 ----
system("chown -R root.$httpduser $intranetdir");
+ # LAUNCH SCRIPT
+ print "Modifying Z39.50 daemon launch script...\n";
+ my $newfile='';
+ open (L, "$intranetdir/scripts/z3950daemon/z3950-daemon-launch.sh");
+ while (<L>) {
+ if (/^RunAsUser=/) {
+ $newfile.="RunAsUser=$httpduser\n";
+ } elsif (/^KohaZ3950Dir=/) {
+ $newfile.="KohaZ3950Dir=$intranetdir/scripts/z3950daemon\n";
+ } else {
+ $newfile.=$_;
+ }
+ }
+ close L;
+ system("mv $intranetdir/scripts/z3950daemon/z3950-daemon-launch.sh
$intranetdir/scripts/z3950daemon/z3950-daemon-launch.sh.orig");
+ open L, ">$intranetdir/scripts/z3950daemon/z3950-daemon-launch.sh";
+ print L $newfile;
+ close L;
+
+ unless ($kohalogdir && -e $kohalogdir) {
+ $kohalogdir='/var/log/koha';
+ print "\n\nDirectory for logging by Z39.50 daemon [$kohalogdir]: ";
+ chomp($input = <STDIN>);
+ if ($input) {
+ $kohalogdir=$input;
+ }
+ }
+
+ unless (-e "$kohalogdir") {
+ my $result = mkdir 0770, "$kohalogdir";
+ if ($result==0) {
+ my @dirs = split(m#/#, $kohalogdir);
+ my $checkdir='';
+ foreach (@dirs) {
+ $checkdir.="$_/";
+ unless (-e "$checkdir") {
+ mkdir($checkdir, 0775);
+ }
+ }
+ }
+ }
+
+ # SHELL SCRIPT
+ print "Modifying Z39.50 daemon wrapper script...\n";
+ $newfile='';
+ open (S, "$intranetdir/scripts/z3950daemon/z3950-daemon-shell.sh");
+ while (<S>) {
+ if (/^KohaModuleDir=/) {
+ $newfile.="KohaModuleDir=$intranetdir/modules\n";
+ } elsif (/^KohaZ3950Dir=/) {
+ $newfile.="KohaZ3950Dir=$intranetdir/scripts/z3950daemon\n";
+ } elsif (/^LogDir=/) {
+ $newfile.="LogDir=$kohalogdir\n";
+ } else {
+ $newfile.=$_;
+ }
+ }
+ close S;
+
+ system("mv $intranetdir/scripts/z3950daemon/z3950-daemon-shell.sh
$intranetdir/scripts/z3950daemon/z3950-daemon-shell.sh.orig");
+ open S, ">$intranetdir/scripts/z3950daemon/z3950-daemon-shell.sh";
+ print S $newfile;
+ close S;
+ chmod 0750, "$intranetdir/scripts/z3950daemon/z3950-daemon-launch.sh";
+ chmod 0750, "$intranetdir/scripts/z3950daemon/z3950-daemon-shell.sh";
+ chmod 0750, "$intranetdir/scripts/z3950daemon/processz3950queue";
+ chown(0, (getpwnam($httpduser)) [3],
"$intranetdir/scripts/z3950daemon/z3950-daemon-shell.sh") or warn "can't chown
$intranetdir/scripts/z3950daemon/z3950-daemon-shell.sh: $!";
+ chown(0, (getpwnam($httpduser)) [3],
"$intranetdir/scripts/z3950daemon/processz3950queue") or warn "can't chown
$intranetdir/scripts/z3950daemon/processz3950queue: $!";
***************
*** 340,343 ****
--- 412,418 ----
$kccontents.="kohaversion=$newversion\n";
$kc->{'kohaversion'}=1;
+ } elsif (/^\s*kohalogdir\s*=/) {
+ $kccontents.="kohalogdir=$kohalogdir\n";
+ $kc->{'kohalogdir'}=1;
} elsif (/^\s*intranetdir\s*=/) {
$kccontents.="intranetdir=$intranetdir\n";
***************
*** 365,368 ****
--- 440,446 ----
unless (defined($kc->{'opacdir'})) {
$kccontents.="opacdir=$opacdir\n";
+ }
+ unless (defined($kc->{'kohalogdir'})) {
+ $kccontents.="kohalogdir=$kohalogdir\n";
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha buildrelease,1.1.2.16,1.1.2.17 installer.pl,1.2.2.53,1.2.2.54 koha.upgrade,1.1.2.9,1.1.2.10,
Steve Tonnesen <=