[Bucardo-general] Patch to Fix Database Respawn Problem
Ben Allen
bsa at lanl.gov
Mon Mar 9 19:26:16 UTC 2009
This patch fixes a problem where on respawn attempt .//usr/local/bin/
bucardo_ctl is called. I've seen this problem in FreeBSD when using
the freebsd RC script.
diff --git a/Bucardo.pm b/Bucardo.pm
index 5c39e68..f637ef2 100644
--- a/Bucardo.pm
+++ b/Bucardo.pm
@@ -1158,7 +1158,10 @@ sub start_mcp {
## We assume this is bucardo_ctl, and that
we are in same directory as when called
my $RUNME = $old0;
- $RUNME = "./$RUNME" if index($RUNME,'.')!=0;
+ ## Check to see if $RUNME is executable as
is, before we assume we're in the same directory
+ unless(-x $RUNME) {
+ $RUNME = "./$RUNME" if index
($RUNME,'.')!=0;
+ }
$RUNME .= qq{ start "Attempting automatic
respawn after MCP death"};
$self->glog("Respawn attempt: $RUNME");
exec $RUNME;
More information about the Bucardo-general
mailing list