X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=bin%2FBackupPC_link;h=c7e925d672c53dacc06b4e20ba756ac9525e4d0c;hp=8bd8dc1a8403fc060249299725fec161976e6e60;hb=e951f787a66c5bd9e9955c3f657a5b44289c0fe1;hpb=0697368bbcef14908cd4684cf07744dc840464de diff --git a/bin/BackupPC_link b/bin/BackupPC_link index 8bd8dc1..c7e925d 100755 --- a/bin/BackupPC_link +++ b/bin/BackupPC_link @@ -1,4 +1,4 @@ -#!/bin/perl -T +#!/bin/perl #============================================================= -*-perl-*- # # BackupPC_link: link new backup into pool @@ -21,7 +21,7 @@ # Craig Barratt # # COPYRIGHT -# Copyright (C) 2001 Craig Barratt +# Copyright (C) 2001-2003 Craig Barratt # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -39,13 +39,14 @@ # #======================================================================== # -# Version 2.0.0_CVS, released 18 Jan 2003. +# Version 2.1.0, released 20 Jun 2004. # # See http://backuppc.sourceforge.net. # #======================================================================== use strict; +no utf8; use lib "/usr/local/BackupPC/lib"; use BackupPC::Lib; use BackupPC::Attrib; @@ -70,7 +71,7 @@ if ( @ARGV != 1 ) { print("usage: $0 \n"); exit(1); } -if ( $ARGV[0] !~ /^([\w\.-\s]+)$/ ) { +if ( $ARGV[0] !~ /^([\w\.\s-]+)$/ ) { print("$0: bad host name '$ARGV[0]'\n"); exit(1); } @@ -106,6 +107,7 @@ while ( 1 ) { $CurrDumpDir = "$Dir/$Backups[$num]{num}"; $Compress = $Backups[$num]{compress}; if ( open(NEW, "<", "$Dir/NewFileList.$Backups[$num]{num}") ) { + binmode(NEW); while ( ) { chomp; next if ( !/(\w+) (\d+) (.*)/ ); @@ -126,7 +128,7 @@ while ( 1 ) { # my $noFill = 1; my $fillFromNum; - if ( $Backups[$num]{type} eq "full" ) { + if ( $Backups[$num]{type} ne "incr" ) { $noFill = 0 } elsif ( $Conf{IncrFill} ) { my $i;