From b902f17fa5fed4cc0a121bca4ebabbefa42981b7 Mon Sep 17 00:00:00 2001 From: slef Date: Wed, 5 Nov 2003 23:31:10 +0000 Subject: [PATCH] z3950 fixes and version display fixes --- misc/Install.pm | 19 +++++++++++++++++-- misc/koha.upgrade | 2 +- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/misc/Install.pm b/misc/Install.pm index e538a1ea81..d80125ef39 100644 --- a/misc/Install.pm +++ b/misc/Install.pm @@ -369,6 +369,18 @@ sub setetcdir ($) { ($etcdir) = @_; } +=item getkohaversion + + getkohaversion(); + +Gets the Koha version as known by the previous config file. + +=cut + +sub getkohaversion ($) { + return($kohaversion); +} + =item setkohaversion setkohaversion('1.3.3RC26'); @@ -1581,14 +1593,17 @@ opachtdocs=$opacdir/htdocs/opac-tmpl #MJR: generate our own settings, to remove the /home/paul hardwired links open(FILE,">$intranetdir/scripts/z3950daemon/z3950-daemon-options"); - print FILE "RunAsUser=apache\nKohaZ3950Dir=$intranetdir/scripts/z3950daemon\nKohaModuleDir=$intranetdir/modules\nLogDir=$kohalogdir\nKohaConf=$etcdir/koha.conf"; + print FILE "RunAsUser=$httpduser\nKohaZ3950Dir=$intranetdir/scripts/z3950daemon\nKohaModuleDir=$intranetdir/modules\nLogDir=$kohalogdir\nKohaConf=$etcdir/koha.conf"; close(FILE); if ($> == 0) { chown((getpwnam($httpduser)) [2,3], "$etcdir/koha.conf.tmp") or warn "can't chown koha.conf: $!"; 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: $!"; - } #MJR: FIXME: Should report that we haven't chown()d. + } #MJR: report that we haven't chown()d. + else { + print "Please check permissions in $intranetdir/scripts/z3950daemon\n"; + } showmessage(getmessage('OldFiles'),'PressEnter'); } diff --git a/misc/koha.upgrade b/misc/koha.upgrade index 83e6d3d359..245d316f8f 100644 --- a/misc/koha.upgrade +++ b/misc/koha.upgrade @@ -14,7 +14,7 @@ Install::setetcdir($ENV{etcdir}||'/etc'); my $input; loadconfigfile(); -($::kohaversion) || ($::kohaversion='unknown version'); +($::kohaversion = Install::getkohaversion() ) || ($::kohaversion='unknown version'); $::newversion=`cat koha.version`; chomp $::newversion; if ($::newversion =~ /RC/) { -- 2.39.5