SUMMARY Comparing patches on systems

From: Shirley Gruber (shirley@SLAC.Stanford.EDU)
Date: Mon Nov 23 1998 - 15:55:19 CST


Is there an easy way to compare the patch and release levels on two
Solaris systems to see how they differ? Is there some equivalent of
showrev that lists only the most recent revision of the patch and not all
the replaced patches as well?

Barring this, has anyone written a script that with either
        1) compare two machines to see how the patch levels differ
or 2) compare a given machine against a set list of patches?


Within a few hours I had more than a dozen responses. Thanks to all.
The following people pointed to the Sun patchdiag utility from SunSolve:

Some people referred me to other tools and/or programs they had written
themselves. I include those messages below:

>From Tue Nov 17 16:31:17 1998

Should be pretty easy.

        /usr/bin/ls -1 /var/sadm/patch

should give you the patches installed.

        echo 123456-78 | awk -F- '{ print $1 }'

should give you the patch number.

        echo 123456-78 | awk -F- '{ print $2 }'

should give you the rev number.
(perl works great here but not everyone likes using perl)

So, if you have a flatfile with the names of patches that you want
installed, you can:

cd /var/sadm/patch
for i in `cat $tmpfile` ; do
  PATCH=`echo $i | awk -F- '{ print $1 }'`
  REV=` echo $i | awk -F- '{ print $2 }'`
  mypatch=`/usr/bin/ls ${PATCH}-..`
  if [ X"$mypatch" -ne "X" ] ; then
    $MyRev=`echo $mypatch | awk -F- '{ print $2 }'`
    if [ $MyRev -lt $REV ] ; then
      echo "Patch $PATCH not up to date. Get rev $REV"
    echo "Missing patch $PATCH. Get rev $REV"

I wrote this up in the email so it hasn't been tested for typos...
hope that helps.


>From Tue Nov 17 23:55:43 1998

check out PatchReport



>From Wed Nov 18 05:26:12 1998

I have written a script that compares the patches on a given machine to
Sun's recommended patch list. This requires that you download Sun's
recommended patch's regularly. Also, the script would require modification
to suit your environment. And finally, I use fastpatch instead of the
traditional installpatch method. However, I would be happy to send you the
script if you want it. Actually there are two scripts. One for 2.5.1 and
one for 2.6.

Regards, Mark...


>From efinch@eos.EAST.HITC.COM Wed Nov 18 10:16:52 1998

I put my Bourne-shell script on my website,

Best regards,
Ed Finch


>From Wed Nov 18 10:40:32 1998

Joe Shamblin's PatchReport is perl script which fetches the Recommende patch
list from SunSolve and reports needed patches, perhaps this is a good place
for your to start. Casper Dik's autoinstall package includes a patch tool
which removes outdated patches.


This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:53 CDT