IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 24, 2015, 5:35:11 PM (11 years ago)
Author:
watersc1
Message:

Commiting the run versions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/stsci_disks/p1_clear.pl

    r38364 r38682  
    5151    defined $host && defined $volume && defined $dir &&
    5252    defined $db && defined $dbhost && defined $dbuser && defined $dbpass;
     53
     54my $host_check = `hostname`;
     55chomp($host_check);
     56if ($host ne $host_check) {
     57    die "Required to run on $host.  not on $host_check\n";
     58}
    5359
    5460my $dbh = DBI->connect(
     
    125131            }
    126132
    127             $md5sums[$i] = local_md5sum($f);
     133            $md5sums[$i] = actual_local_md5sum($f);
    128134            unless (defined($md5sums[$i])) {
    129135                die("Failed to calculate md5sum locally. $f ");
     
    218224            if (defined($vols[$i])) {
    219225#               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 $@;
    221230            }
    222231            else {
     
    282291    };
    283292
     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    }
    284304    return($vol_host);
    285305}
     
    326346    return($sum);
    327347}
     348
     349sub 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.