Changeset 38682 for trunk/tools/stsci_disks/p1_clear.pl
- Timestamp:
- Aug 24, 2015, 5:35:11 PM (11 years ago)
- File:
-
- 1 edited
-
trunk/tools/stsci_disks/p1_clear.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/stsci_disks/p1_clear.pl
r38364 r38682 51 51 defined $host && defined $volume && defined $dir && 52 52 defined $db && defined $dbhost && defined $dbuser && defined $dbpass; 53 54 my $host_check = `hostname`; 55 chomp($host_check); 56 if ($host ne $host_check) { 57 die "Required to run on $host. not on $host_check\n"; 58 } 53 59 54 60 my $dbh = DBI->connect( … … 125 131 } 126 132 127 $md5sums[$i] = local_md5sum($f);133 $md5sums[$i] = actual_local_md5sum($f); 128 134 unless (defined($md5sums[$i])) { 129 135 die("Failed to calculate md5sum locally. $f "); … … 218 224 if (defined($vols[$i])) { 219 225 # print "HERE: $keys[$i] $host $volume\n"; 220 $neb->cull($keys[$i],$host . "." . $volume); 226 eval { 227 $neb->cull($keys[$i],$host . "." . $volume); 228 }; 229 warn "CULL ERROR: $@" if $@; 221 230 } 222 231 else { … … 282 291 }; 283 292 293 if (defined($vol_host)) { 294 if ($vol_host eq 'ipp066') { 295 $vol_host = get_volume($key); 296 if ($vol_host eq 'ipp066') { 297 # Really? 298 $vol_host = get_volume($key); 299 # if ($vol_host eq 'ipp066') {} #fine. Be that way. Jerk. 300 # 301 } 302 } 303 } 284 304 return($vol_host); 285 305 } … … 326 346 return($sum); 327 347 } 348 349 sub actual_local_md5sum { 350 my $filename = shift; 351 my $response = `md5sum $filename`; 352 chomp($response); 353 my ($sum, undef) = split /\s+/, $response; 354 unless(defined($sum)) { 355 warn("Failed to calculate md5sum Actually locally. $filename $host $volume"); 356 } 357 return($sum); 358 }
Note:
See TracChangeset
for help on using the changeset viewer.
