/[BackupPC]/trunk/bin/BackupPC_incPartsUpdate
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 /trunk/bin/BackupPC_incPartsUpdate

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

revision 281 by dpavlin, Wed Dec 14 14:57:51 2005 UTC revision 289 by dpavlin, Wed Jan 18 15:16:31 2006 UTC
# Line 16  use Archive::Tar::Streamed; Line 16  use Archive::Tar::Streamed;
16  use Algorithm::Diff;  use Algorithm::Diff;
17  use Getopt::Std;  use Getopt::Std;
18  use File::Slurp;  use File::Slurp;
19    use File::Pid;
20    
21    my $pid_path = abs_path($0);
22    $pid_path =~ s/\W+/_/g;
23    
24    my $pidfile = new File::Pid({
25            file => "/tmp/$pid_path",
26    });
27    
28    if (my $pid = $pidfile->running ) {
29            die "$0 already running: $pid\n";
30    } elsif ($pidfile->pid ne $$) {
31            $pidfile->remove;
32            $pidfile = new File::Pid;
33    }
34    
35    print STDERR "$0 using pid ",$pidfile->pid," file ",$pidfile->file,"\n";
36    $pidfile->write;
37    
38  my $bpc = BackupPC::Lib->new || die "can't create BackupPC::Lib";  my $bpc = BackupPC::Lib->new || die "can't create BackupPC::Lib";
39  my %Conf = $bpc->Conf();  my %Conf = $bpc->Conf();
# Line 245  sub tar_check($$$$) { Line 263  sub tar_check($$$$) {
263    
264                  # real tar size is bigger because of padding                      # real tar size is bigger because of padding    
265                  if ($tar_size_inarc > $tar_size) {                  if ($tar_size_inarc > $tar_size) {
266                          print ", size of files in tar bigger than whole tar!\n";                          print ", size of files in tar ($tar_size_inarc) bigger than whole tar ($tar_size)!\n";
267                          return 0;                          return 0;
268                  }                  }
269    

Legend:
Removed from v.281  
changed lines
  Added in v.289

  ViewVC Help
Powered by ViewVC 1.1.26