help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Determining Solaris patch revisions


From: rader
Subject: Re: Determining Solaris patch revisions
Date: Wed, 21 Sep 2005 09:18:08 -0500

 > I was thinking of writing a module that would parse the output of 'showrev
 >  -p', 
 > determine the latest rev and then for each patch print out:
 > 
 > =patch_<patchrev>=<rev>
 > 
 > For example:
 > 
 > =patch_118558=3
 > 
 > Numerical comparisons could then be used to determin if a rev was equal, 
 > greater, or less than.
 > 
 > Any other ideas?

#!/usr/bin/perl -w
use strict;
open(IN,"showrev -p |");
while(<IN>) {
  if ( $_ =~ /^Patch: (\d+)\-(\d+)/ ) {
    print "=solaris_patchrev_$1=$2\n";
  }
}
close(IN);

...seems simple enough?

...but do you know what patches you care about in advance?  The set
of classes defined by the (any) module needs to be explictly defined
with addinstallable = ( )

steve 
- - - 
systems & network manager
high energy physics
university of wisconsin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]