/[rserv]/bin/SlaveInit
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /bin/SlaveInit

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by dpavlin, Sun Nov 2 10:21:45 2003 UTC revision 1.9 by dpavlin, Sun Nov 2 10:31:44 2003 UTC
# Line 6  eval '(exit $?0)' && eval 'exec perl -S Line 6  eval '(exit $?0)' && eval 'exec perl -S
6      & eval 'exec perl -S $0 $argv:q'      & eval 'exec perl -S $0 $argv:q'
7      if 0;      if 0;
8    
9    BEGIN {
10            my $basedir = $0; $basedir =~ s#/[^/]+$##;
11            unshift(@INC, "$basedir/../share");
12    }
13    
14  use strict;  use strict;
15  use Pg;  use Pg;
16  use Getopt::Long;  use Getopt::Long;
17    use RServ;
18    
19  $| = 1;  $| = 1;
20    
# Line 42  my $slave = $ARGV[1] || "slave"; Line 48  my $slave = $ARGV[1] || "slave";
48  my $minfo = MkInfo($master,$masterhost,$masterport,$masteruser,$masterpassword);  my $minfo = MkInfo($master,$masterhost,$masterport,$masteruser,$masterpassword);
49  my $sinfo = MkInfo($slave,$slavehost,$slaveport,$slaveuser,$slavepassword);  my $sinfo = MkInfo($slave,$slavehost,$slaveport,$slaveuser,$slavepassword);
50    
 sub RollbackAndQuit {  
     my $conn = shift @_;  
   
     print STDERR $conn->errorMessage;  
     $conn->exec("ROLLBACK");  
     exit (-1);  
 }  
   
51  # First, lets add the needed information in the slave database  # First, lets add the needed information in the slave database
52    
53  print("Connecting to $sinfo\n") if ($debug || $verbose);  print("Connecting to $sinfo\n") if ($debug || $verbose);

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

  ViewVC Help
Powered by ViewVC 1.1.26