[pca] PCA return codes

Rajiv Gunja opn.src.rocks at gmail.com
Sat Sep 27 14:26:12 CEST 2008


Martin,I see that every one seem to download and install patches at the same
time, but on production server or on servers without public network access,
I usually download the patches and then install it as 2 separate steps.

Since pca is designed to download and install, even though the patch is
already downloaded, it attempts the download and skips as the patch is
present and then it install it.

Is there a way to avoid this attempt of download and directly install the
patch from the directory mentioned in patchdir option?

Please let me know. Thanks

-GGR

--
Rajiv G Gunja
Blog: http://ossrocks.blogspot.com


2008/9/24 Martin Paul <martin at par.univie.ac.at>

> Christophe Kalt wrote:
>
>> On Sep 16, Fred Chagnon wrote:
>> | In my wrapper script for pca, I would like to be able to determine if
>> pca
>> | finished patching completely, or if it finished prematurely, perhaps due
>> to
>> | a patch that required an immediate reconfigure reboot. Does pca have
>> | different return codes for these situations?
>> Agreed, suggested it back in February as it's part of what
>> makes it painful to write a decent wrapper around pca.
>>
>
> I know, but I still haven't found a solution for the problem that there are
> multiple different situations which should be reported by pca, all in one
> exit value.
>
> For the wrapper script it might be interesting whether pca installed some
> patch and succeeded or failed (with all or just one of many). Was there a
> download attempt that failed? If patches were installed - is a reboot
> recommended or required? What if one patch fails to download, another
> downloads fine but fails to install, and even another downloads and installs
> fine?
>
> I guess a solution might be to use different bits in the exit value for
> various cases, e.g.:
>
>  bit 0: set if a download was successful
>  bit 1: set if a download failed
>  bit 2: set if any patch was installed successfully
>  bit 3: set if any patch failed to install
>  bit 4: reboot recommended
>  bit 5: reboot required
>  bit 6: set if any patch is listed, 0 if none
>  bit 7: general error (external command not found, etc.)
>
> There are two problems with that as well: Even with the above examples, all
> 8 bits are already used - there's no space for extra flags in the future
> (and I'm sure some of you can think of other required flags right now).
>
> Plus, not every shell does have bitwise logical operators; at least I
> couldn't find a way to handle such an exit code in e.g. bourne shell (and
> the "test" and "expr" commands don't seem to handle it either).
>
> Ideas, anyone?
>
> Martin.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.univie.ac.at/mailman/private/pca/attachments/20080927/faf8351d/attachment.html 


More information about the pca mailing list