Operating System - HP-UX
1833784 Members
2229 Online
110063 Solutions
New Discussion

Looking for way to test that patch install was successful within script.

 
SOLVED
Go to solution
Dee_3
Regular Advisor

Looking for way to test that patch install was successful within script.

I am looking to distribute several HP patches to multiple HP systems by tape. I have created a script that does the swinstall fine, but I would like to verify that the patch installed successfully without user interaction. I have tried grepping within /var/adm/sw/products for the patch number but I am looking for a best practice to carry forward as a template for future patch distibutions. I've tried using swlist and utilizing it's response, but that command is best written back to the screen. Any suggestions are appreciated. Thank you.
5 REPLIES 5
Tom Geudens
Honored Contributor

Re: Looking for way to test that patch install was successful within script.

Hi,
This may be too simple a solution, but swverify would do that trick ...

Hope this helps,
Tom Geudens
A life ? Cool ! Where can I download one of those from ?
Paula J Frazer-Campbell
Honored Contributor

Re: Looking for way to test that patch install was successful within script.

Terri

You also need to get the output from the patch installation script and examine that for errors like :-

"Insufficient disk space"
"Failed"
etc

As a swlist could report the patch installed, but there could be errors.

HTH Paula
If you can spell SysAdmin then you is one - anon
Eileen Millen
Trusted Contributor
Solution

Re: Looking for way to test that patch install was successful within script.

swlist -l fileset -a state | grep PHXX_XXXX
The patch should be listed as configured.
Eileen
James R. Ferguson
Acclaimed Contributor

Re: Looking for way to test that patch install was successful within script.

Hi Terri:

You can use 'check_patches' and/or examine the state of individual patches with:

# swlist -a state -l

Regards!

...JRF...
Dee_3
Regular Advisor

Re: Looking for way to test that patch install was successful within script.

Thanks for the suggestions. It looks like I'll be utilizing swlist since I'm covering several os levels (ie. 10.01, 10.20, 11.0). Terri.