Changeset 730


Ignore:
Timestamp:
Apr 13, 2008, 11:09:26 PM (16 years ago)
Author:
price
Message:
parallel-find.pl: do the next few steps too.

* for each .scripts-version file, do an fs la and ignore if
  scripts-security-upd no longer has rlidwk
* from each .scripts-version file, grab the version line and
  include that in the output.

Still skips non-Athena-cell lockers.  Why those finds hang for me
(I still have about fifty finds in uninterruptible wait, hours later,
despite attempting kill -9) remains an open problem.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • locker/sbin/parallel-find.pl

    r729 r730  
    2020# use -xdev.  May miss libraries stuff.
    2121
     22sub updatable ($) {
     23    my $filename = shift;
     24    for my $l (`fs la "$filename"`) {
     25        return 1 if ($l =~ /^  system:scripts-security-upd rlidwk/);
     26    }
     27    return 0;
     28}
     29
     30sub version ($) {
     31    my $dirname = shift;
     32    open my $h, "$dirname/.scripts-version";
     33    return (<$h>)[-1];
     34}
     35
    2236sub find ($$) {
    2337    my $user = shift;
     
    2741    open my $out, ">$dump/$user";
    2842    while (my $f = <$files>) {
    29         print $out $f;
     43        chomp $f;
     44        $f =~ s!/\.scripts-version$!!;
     45        if (! updatable($f)) {
     46            print STDERR "not updatable: $f";
     47            next;
     48        }
     49        $v = version($f);
     50        print $out "$f:$v";
    3051    }
    3152    return 0;
Note: See TracChangeset for help on using the changeset viewer.