[pca] PCA return codes

Martin Paul martin at par.univie.ac.at
Fri Oct 24 10:00:16 CEST 2008


Ron,

> If I am installing many patches using a wrapper, is the exit code
> valid for the (for the want of a better word) cluster as a whole
> or for each patch installed.

It's for the whole cluster. A process (pca, in this case) can only 
return one exit code per run, so it can't provide information about 
single patches.

 > How can I capture the exit code(s) for pca -i missingrs?

A sample script could look like this (untested!):

   #!/bin/sh

   /path/to/pca -i missingrs
   x=$?
   test $x = 1 && echo "Unknown error"
   if test $x = 4 -o $x = 5
   then
     echo "Reboot required/recommended. Reboot now?"
     ...
     /usr/sbin/init 6
   fi

Hope that helps.

> PS Martin, your code is great. I just built a Solaris 10 U5
> machine and its being patched with 69 patches as I type.
> This sure beats the old way.

Thanks for that!

Martin.



More information about the pca mailing list