/[rserv]/bin/MasterInit
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/MasterInit

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

revision 1.10 by dpavlin, Sun Nov 2 10:21:45 2003 UTC revision 1.11 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 59  if (!defined($lib) || !-e $lib) { Line 65  if (!defined($lib) || !-e $lib) {
65  }  }
66  print "Using lib '$lib'\n" if ($verbose);  print "Using lib '$lib'\n" if ($verbose);
67    
 sub RollbackAndQuit {  
     my $conn = shift @_;  
   
     print STDERR "Error in query: ", $conn->errorMessage;  
     $conn->exec("ROLLBACK");  
     exit (-1);  
 }  
   
68  my $mconn = Pg::connectdb($minfo);  my $mconn = Pg::connectdb($minfo);
69  if ($mconn->status != PGRES_CONNECTION_OK) {  if ($mconn->status != PGRES_CONNECTION_OK) {
70      print STDERR "Failed opening $minfo\n";      print STDERR "Failed opening $minfo\n";

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

  ViewVC Help
Powered by ViewVC 1.1.26