Changeset 36221 for trunk/ippScripts/scripts
- Timestamp:
- Oct 16, 2013, 3:49:07 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/rawcheck.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/rawcheck.pl
r36203 r36221 28 28 GetOptions( 29 29 'server|s=s' => \$server, 30 'dbname '=> \$dbname,30 'dbname=s' => \$dbname, 31 31 'exp_id|x=s' => \$exp_id, 32 32 ) || pod2usage( 2 ); … … 36 36 pod2usage( -msg => "Required options: --server", -exitval => 2 ) 37 37 unless $server; 38 pod2usage( -msg => "Required options: --dbname", -exitval => 2 ) 39 unless $dbname; 38 40 pod2usage( -msg => "missing key", exitval => 2 ) 39 41 unless defined $exp_id; … … 217 219 $quality[0] = 1; 218 220 print "cp $good_file $files[0]\n"; 221 system("cp $good_file $files[0]"); 222 # Begin my best validation thought 223 { 224 my $fh; 225 open($fh,$files[0]); 226 my $tmpmd5 = Digest::MD5->new->addfile($fh)->hexdigest; 227 close($fh); 228 if ($tmpmd5 ne $md5sum) { 229 die "Post-replication md5sum does not match! $tmpmd5 != $md5sum"; 230 } 231 } 232 # End my best validation thought. 233 219 234 $Ngood = 1; # We now hand off this single valid instance object to be handled by the Ngood=1 case. 220 235 } … … 265 280 @$uris = map {URI->new($_)->file if $_} @$uris; 266 281 267 print $uris . " " . ${ $uris }[0] . " \n";282 # print $uris . " " . ${ $uris }[0] . " \n"; 268 283 my $fh; 269 284 open($fh,${ $uris }[0]); … … 287 302 } 288 303 for (my $i = 0; $i <= $#files; $i++) { 289 print "$existance[$i] $quality[$i] $md5sums[$i] $md5sum $diskhosts[$i] $diskvols[$i]\n";304 # print "$existance[$i] $quality[$i] $md5sums[$i] $md5sum $diskhosts[$i] $diskvols[$i]\n"; 290 305 if ($quality[$i] != 1) { 291 306 my $cull_vol = $diskhosts[$i] . "." . $diskvols[$i];
Note:
See TracChangeset
for help on using the changeset viewer.
