[rt-users] flock in sbin/rt-fulltext-indexer fails when RT installed on RO filesystem
Lee Damon
nomad at ee.washington.edu
Mon Feb 23 18:15:15 EST 2015
I'm trying to install RT 4.2.9 into a volume in OpenAFS. I have the vast
majority of it working fine (with the patch I posted last week adding @
to the acceptable characters in a path in lib/RT/I18N.pm). However,
there is one problem I'm still seeing.
This chunk of code in sbin/rt-fulltext-indexer works fine when the
script is on a RW filesystem but fails when the file is in a RO
filesystem like AFS:
use Fcntl ':flock';
if ( !flock main::DATA, LOCK_EX | LOCK_NB ) {
if ( $OPT{quiet} ) {
RT::Logger->info("$0 is already running; aborting silently, as
requested");
exit;
}
else {
print STDERR "$0 is already running\n";
exit 1;
}
}
I'm not a Perl writer (or even reader, really) so I don't know if it
would be an easy change to add an optional command line argument to let
the admin specify a lock file (e.g. /var/lock/rt-fulltext-indexer) for
it to use instead of flocking itself.
nomad
More information about the rt-users
mailing list