Commit 1d5d5a1c authored by tsmith/tim@siva.hindu.god's avatar tsmith/tim@siva.hindu.god

Merge siva.hindu.god:/usr/home/tim/m/bk/40

into  siva.hindu.god:/usr/home/tim/m/bk/41
parents 65dd6e0c 3e20a108
...@@ -262,6 +262,7 @@ my $hc_locks = ""; ...@@ -262,6 +262,7 @@ my $hc_locks = "";
my $hc_tables = ""; my $hc_tables = "";
my $num_tables = 0; my $num_tables = 0;
my $num_files = 0; my $num_files = 0;
my $raid_dir_regex = '[A-Za-z0-9]{2}';
foreach my $rdb ( @db_desc ) { foreach my $rdb ( @db_desc ) {
my $db = $rdb->{src}; my $db = $rdb->{src};
...@@ -293,7 +294,7 @@ foreach my $rdb ( @db_desc ) { ...@@ -293,7 +294,7 @@ foreach my $rdb ( @db_desc ) {
my @raid_dir = (); my @raid_dir = ();
while ( defined( my $name = readdir DBDIR ) ) { while ( defined( my $name = readdir DBDIR ) ) {
if ( $name =~ /^\d\d$/ && -d "$db_dir/$name" ) { if ( $name =~ /^$raid_dir_regex$/ && -d "$db_dir/$name" ) {
push @raid_dir, $name; push @raid_dir, $name;
} }
else { else {
...@@ -601,7 +602,7 @@ sub copy_files { ...@@ -601,7 +602,7 @@ sub copy_files {
# add recursive option for scp # add recursive option for scp
$cp.= " -r" if $^O =~ /m^(solaris|linux|freebsd|darwin)$/ && $method =~ /^scp\b/; $cp.= " -r" if $^O =~ /m^(solaris|linux|freebsd|darwin)$/ && $method =~ /^scp\b/;
my @non_raid = map { "'$_'" } grep { ! m:/\d{2}/[^/]+$: } @$files; my @non_raid = map { "'$_'" } grep { ! m:/$raid_dir_regex/[^/]+$: } @$files;
# add files to copy and the destination directory # add files to copy and the destination directory
safe_system( $cp, @non_raid, "'$target'" ) if (@non_raid); safe_system( $cp, @non_raid, "'$target'" ) if (@non_raid);
...@@ -809,7 +810,7 @@ sub get_raid_dirs { ...@@ -809,7 +810,7 @@ sub get_raid_dirs {
my %dirs = (); my %dirs = ();
foreach my $f ( @$r_files ) { foreach my $f ( @$r_files ) {
if ( $f =~ m:^(\d\d)/: ) { if ( $f =~ m:^($raid_dir_regex)/: ) {
$dirs{$1} = 1; $dirs{$1} = 1;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment