Changeset 32547
- Timestamp:
- Oct 13, 2011, 3:56:35 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/Nebulous/bin/neb-repair (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Nebulous/bin/neb-repair
r32529 r32547 73 73 open($fh,$files[$i]); 74 74 $md5sums[$i] = Digest::MD5->new->addfile($fh)->hexdigest; 75 close($fh); 76 75 77 $md5sum_uniq{$md5sums[$i]} = 1; 78 79 if ($md5sums[$i] eq 'd41d8cd98f00b204e9800998ecf8427e') { 80 $existance[$i] = 0; 81 next; 82 } 83 76 84 push @{ $md5sum_valid{$md5sums[$i]} }, $files[$i]; 77 85 $last_f = $files[$i]; 78 close($fh);79 86 } 80 87 else { … … 119 126 system("cp $valid_file $f"); 120 127 if ($? >> 8 != 0) { 128 if ($existance[0] == 1) { 129 # We can fix this with culls and replications. 130 print("neb-replicate $key\n"); 131 system("neb-replicate $key"); 132 if ($? >> 8 == 0) { 133 my $bad_volume = (split /\//, $f)[2]; 134 print("neb-cull --volume $bad_volume $key\n"); 135 system("neb-cull --volume $bad_volume $key"); 136 } 137 } 121 138 die "Failed to copy file $valid_file to $f!\n"; 122 139 }
Note:
See TracChangeset
for help on using the changeset viewer.
