From 6df353fb5e406a9b9631172849e49a3a4ddb6019 Mon Sep 17 00:00:00 2001 From: Doug Kingston Date: Mon, 28 Oct 2013 23:30:31 -0700 Subject: [PATCH 4/4] Bug 11078 Add locking to rebuild_zebra (QA Patch 2 10/28) In the event lockdir is not specified in the koha-conf.xml file which will occur for old installations, default the lockdir to a sensible default (/var/lock). --- misc/migration_tools/rebuild_zebra.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/misc/migration_tools/rebuild_zebra.pl b/misc/migration_tools/rebuild_zebra.pl index e18725c..8b77686 100755 --- a/misc/migration_tools/rebuild_zebra.pl +++ b/misc/migration_tools/rebuild_zebra.pl @@ -143,7 +143,9 @@ my ($biblioitemnumbertagfield,$biblioitemnumbertagsubfield) = &GetMarcFromKohaFi # We need to create our own lock directory which incorporates the database instance # we are indexing to facilitate multiple instances on the same machine. -my $lockdir = C4::Context->config("lockdir") . "/koha_rebuild_zebra_" . C4::Context->config("database"); +my $lockdir = C4::Context->config("lockdir"); +$lockdir = "/var/lock" if $lockdir == ""; +$lockdir .= ("/koha_rebuild_zebra_" . C4::Context->config("database")); mkpath($lockdir, 0, 0755) unless (-d $lockdir); my $lockfile = $lockdir . "/lock"; -- 1.7.9.5