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

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

revision 1.4 by dpavlin, Tue Aug 5 21:10:28 2003 UTC revision 1.7 by dpavlin, Sun Nov 2 10:21:45 2003 UTC
# Line 19  $| = 1; Line 19  $| = 1;
19    
20  my ($debug,$verbose) = (0,0);  my ($debug,$verbose) = (0,0);
21  my ($help,$masterhost,$masterport,$masteruser,$masterpassword);  my ($help,$masterhost,$masterport,$masteruser,$masterpassword);
 my $snapshot = "__Snapshot";  
22    
23  my $result = GetOptions(  my $result = GetOptions(
24          "debug!" => \$debug, "verbose!" => \$verbose, "help" => \$help,          "debug!" => \$debug, "verbose!" => \$verbose, "help" => \$help,
25          "masterhost=s" => \$masterhost, "masterport=i" => \$masterport,          "masterhost=s" => \$masterhost, "masterport=i" => \$masterport,
26          "masteruser=s" => \$masteruser, "masterpassword=s" => \$masterpassword,          "masteruser=s" => \$masteruser, "masterpassword=s" => \$masterpassword,
         "snapshot=s" => \$snapshot,  
27          );          );
28    
29  if (defined($help) || (scalar(@ARGV) < 2) || ($ARGV[1] !~ /^\d+$/)) {  if (defined($help) || (scalar(@ARGV) < 2) || ($ARGV[1] !~ /^\d+$/)) {
# Line 33  if (defined($help) || (scalar(@ARGV) < 2 Line 31  if (defined($help) || (scalar(@ARGV) < 2
31  Options:  Options:
32          --masterhost=hostname --masterport=port          --masterhost=hostname --masterport=port
33          --masteruser=username --masterpassword=string          --masteruser=username --masterpassword=string
         --snapshot=snapshot  
34  ";  ";
35      exit ((scalar(@ARGV) < 2)? 1:0);      exit ((scalar(@ARGV) < 2)? 1:0);
36  }  }
37    
38    $RServ::quiet = !$verbose;
39    if ($debug) {
40            $RServ::quiet = 0;
41            no warnings 'vars';
42            $RServ::debug = $debug;
43    }
44    
45  my $dbname = $ARGV[0];  my $dbname = $ARGV[0];
46  my $howold = $ARGV[1];  my $howold = $ARGV[1];
47    
48  my $minfo = "dbname=$dbname";  my $minfo = MkInfo($dbname,$masterhost,$masterport,$masteruser,$masterpassword);
 $minfo = "$minfo host=$masterhost" if (defined($masterhost));  
 $minfo = "$minfo port=$masterport" if (defined($masterport));  
 $minfo = "$minfo user=$masteruser" if (defined($masteruser));  
 $minfo = "$minfo password=$masterpassword" if (defined($masterpassword));  
49    
50  print "Master connection is $minfo\n" if ($debug);  print "Master connection is $minfo\n" if ($debug);
51    

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.26