Operating System - HP-UX
1827385 Members
3911 Online
109963 Solutions
New Discussion

ways to verifying software install order

 
SOLVED
Go to solution
Bill McNAMARA_1
Honored Contributor

ways to verifying software install order

Hi all,

I've been wanting to ask this q for a few days, while the site was down, and still haven't figured out how it can be done best..

I've got a few products + patches, that must be installed in the correct order.

I want to write a script to verify that the s/w was installed in the correct order.

Is there a way using swverify or swlist to verify this..

The only way I can think of, that doesn't involve looking at logs is:

date of install using swlist

and

what string validation of installed s/w

The way that I prefer is the date/time..

Can you help me getting the swverify or ll command that'll find when the product was installed..

Thanks,
Bill
It works for me (tm)
4 REPLIES 4
Robin Wakefield
Honored Contributor
Solution

Re: ways to verifying software install order

Hi Bill,

How about this:

swlist -l fileset -a install_date | grep ^# | tail +6 | sort +2n |
awk '{printf("%-30s\tinstalled on %s/%s/%s %s:%s\n",
$2,substr($3,1,4),substr($3,5,2),substr($3,7,2),substr($3,9,2),substr($3,11,2))}'

Rgds, Robin
Marcin Wicinski
Trusted Contributor

Re: ways to verifying software install order

Hi Bill,
I think it is hard to verify the order of installation without checking logs, but if something went wrong You would be able to check it with:
- what (as you said)
- # swlist -l fileset -a state | grep -v ^# | grep -v conf - the result shuold be empty (I think if the order was wrong the state of fiilesets would be only installed or corrupted).
Marcin Wicinski
Marcin Wicinski
Trusted Contributor

Re: ways to verifying software install order

Robin - that's good !
Marcin Wicinski
Bill McNAMARA_1
Honored Contributor

Re: ways to verifying software install order

I managed to get it done with an ll based on time..

this works fine..

ll -t /var/adm/sw/products/ | grep "OC-" | grep -v SUPP | grep -v SEC > /tmp/1

cat /tmp/1 | awk '{print $9}' > /tmp/install.order

Alternatively for patches..
ll -t /var/adm/sw/products/ | grep PHXYZ > file
ll -t /var/adm/sw/products/ | grep PH123 >> file

etc..
then

diff file good.way

Later,
Bill
It works for me (tm)