X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=bin%2FBackupPC_archiveStart;h=c527fa46557fe3279242776fb33db42197ef40e3;hp=8f39e06970742800bf8108dcacf4bcb43ac1d865;hb=d1bfa4d92bec24954f2e7877f6531644bb84e8f3;hpb=f9796d809e6a7d4ed2c356f0f32f1a3d628d3d1f;ds=sidebyside diff --git a/bin/BackupPC_archiveStart b/bin/BackupPC_archiveStart index 8f39e06..c527fa4 100755 --- a/bin/BackupPC_archiveStart +++ b/bin/BackupPC_archiveStart @@ -54,7 +54,7 @@ my %opts; # no options currently if ( !getopts("", \%opts) || @ARGV < 3 ) { print STDERR <ConfigRead($ArchiveHost); my(@HostList, @BackupList); for ( my $i = 2 ; $i < @ARGV ; $i++ ) { - my $host = $ARGV[$i]; + my ($host,$num) = split(/:/,$ARGV[$i],2); if ( !defined($Hosts->{$host}) ) { print(STDERR "$0: host $host doesn't exist... quitting\n"); exit(1); @@ -83,7 +83,8 @@ for ( my $i = 2 ; $i < @ARGV ; $i++ ) { exit(1); } push(@HostList, $host); - push(@BackupList, $backups[$#backups]{num}); + $num ||= $backups[$#backups]{num}; + push(@BackupList, $num); } my $ReqFileName;