Index: trunk/ippScripts/scripts/rawcheck.pl
===================================================================
--- trunk/ippScripts/scripts/rawcheck.pl	(revision 36231)
+++ trunk/ippScripts/scripts/rawcheck.pl	(revision 36289)
@@ -81,5 +81,5 @@
 my $regtool_cmd = "$regtool -processedimfile -exp_id $exp_id -dbname $dbname";
 my ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 
-    run(command => $regtool_cmd, verbose => 1);
+    run(command => $regtool_cmd, verbose => 0);
 unless ($success) {
     $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
@@ -133,9 +133,11 @@
 	    $existance[$i] = 1;
 	    $existing_copies++;
-	    my $fh;
-	    open($fh,$files[$i]);
-	    $md5sums[$i] = Digest::MD5->new->addfile($fh)->hexdigest;
+	    $md5sums[$i] = local_md5sum($files[$i]);
+#	    my $fh;
+#	    open($fh,$files[$i]);
+#	    $md5sums[$i] = Digest::MD5->new->addfile($fh)->hexdigest;
+#	    close($fh);
 	    $md5sum_uniq{$md5sums[$i]} = 1;
-	    close($fh);
+
 	}
 	else {
@@ -223,8 +225,9 @@
 # Begin my best validation thought
 	{
-	    my $fh;
-	    open($fh,$files[0]);
-	    my $tmpmd5 = Digest::MD5->new->addfile($fh)->hexdigest;
-	    close($fh);
+	    my $tmpmd5 = local_md5sum($files[0]);
+# 	    my $fh;
+# 	    open($fh,$files[0]);
+# 	    my $tmpmd5 = Digest::MD5->new->addfile($fh)->hexdigest;
+# 	    close($fh);
 	    if ($tmpmd5 ne $md5sum) { 
 		die "Post-replication md5sum does not match! $tmpmd5 != $md5sum";
@@ -257,8 +260,9 @@
 		my $uris = $neb->find_instances($key,$rep_vol);
 		@$uris = map {URI->new($_)->file if $_} @$uris;
-		my $fh;
-		open($fh,${ $uris }[0]);
-		my $tmpmd5 = Digest::MD5->new->addfile($fh)->hexdigest;
-		close($fh);
+		my $tmpmd5 = local_md5sum(${ $uris }[0]);
+# 		my $fh;
+# 		open($fh,${ $uris }[0]);
+# 		my $tmpmd5 = Digest::MD5->new->addfile($fh)->hexdigest;
+# 		close($fh);
 		if ($tmpmd5 ne $md5sum) { 
 		    die "Post-replication md5sum does not match! $tmpmd5 != $md5sum";
@@ -282,9 +286,9 @@
 
 #		print $uris . " " . ${ $uris }[0] . " \n";
-		my $fh;
-		open($fh,${ $uris }[0]);
-
-		my $tmpmd5 = Digest::MD5->new->addfile($fh)->hexdigest;
-		close($fh);
+		my $tmpmd5 = local_md5sum(${ $uris }[0]);
+# 		my $fh;
+# 		open($fh,${ $uris }[0]);
+# 		my $tmpmd5 = Digest::MD5->new->addfile($fh)->hexdigest;
+# 		close($fh);
 		if ($tmpmd5 ne $md5sum) { 
 		    die "Post-replication md5sum does not match! $tmpmd5 != $md5sum";
@@ -318,4 +322,20 @@
 }
 
+sub local_md5sum {
+    my $filename = shift;
+    my $volume   = (split /\//, $filename)[2];
+    my $host     = $volume;
+    $host =~ s/\.\d//;
+#    print "$filename $host $volume\n";
+    my $response = `ssh $host md5sum $filename`;
+    chomp($response);
+    my ($sum, undef) = split /\s+/, $response;
+    unless(defined($sum)) {
+	my_die("Failed to calculate md5sum locally. $filename $host $volume");
+    }
+    return($sum);
+}
+
+
 sub parse_volume {
     my $filename = shift(@_);
@@ -341,7 +361,4 @@
 }
 
-	
-
-
 sub my_die {
     my $msg = shift(@_);
