http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11078

--- Comment #60 from Doug Kingston <[email protected]> ---
(In reply to M. de Rooy from comment #58)
> > > 4) And finally :) what about the defaulting to /var/lock if the zebra lock
> > > has not been defined or so? mkdir /var/lock/rebuild: Permission denied at
> > > misc/migration_tools/rebuild_zebra.pl line 161. I guess that this 
> > > permission
> > > problem could popup in many cases more..
> > 
> > Something like this?
> > my $lockdir = C4::Context->config("zebra_lockdir") // "/var/lock";
> > $lockdir .= "/rebuild";
> > unless (-d $lockdir) {
> >     make_path($lockdir, {verbose=>0, mode=>oct(755), error=>\$err})
> >     $lockdir = "/var/lock" if (@$err);
> > }
> > my $lockfile = $lockdir . "/rebuild..LCK";
> 
> Sorry, that my comment here was not that clear (defaulting was not the right
> word, it should better be fall back). I actually meant that we should better
> choose another folder than /var/lock. If you run the zebra job without root
> permissions, you will probably have no permissions in /var/lock.
> Since this should be an exception, why not just fall back to /tmp (OR just
> skip the locking stuff: if the install is dubious, who complains..) BTW
> there are other places in Koha where write permission in /tmp is just
> assumed. In every case, it is much more likely to be so. Your choice.

OK.  I'll change the fallback location to /tmp - guaranteed to always.  Looks
like a default behavior for adhoc invocation should should be to exit when it
cannot get the lock, with an option to wait_for_lock.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to