Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to verify a package is installed ok through installp?

Status
Not open for further replies.

whn

Programmer
Oct 14, 2007
265
0
0
US
Hi, experts,

I am new to aix and I need to verify whether a SW package is installed successfully through command 'installp'. I know I can use 'lslpp -f' to list the names of the files added to the system during installation of the specified fileset. But how can I tell the output of 'lslpp -f' is all correct?

For example, if I installed a package using 'pkgadd', I should be able to verify the installation according to pkgmap using a command like 'pkgchk -m pkgmap'. Wouldn't there be some similar commands to verify 'installp' is successful?

I have read man page for 'installp' & 'lslpp'. I'd guess 'install -l' could be helpful. But I don't know what argument to follow 'install -p'. To be more specific, I installed a package using thie command:

Code:
% installp -agXd . {packagename}

I guess that I should be able to tell what files are going to be installed before I execute the above command. After installation, I can then check the output of 'lslpp -f {packagename}'.

Could someone here kindly tell me how to find out what files are to be installed before the actuall installation?

Sorry for the lengthy post. I just want to make myself clear.

Thanks.
 
lslpp -L | grep filesetname

Is enough to tell whether the software have been installed or not!

Other than that is using the software to verify!

Regards,
Khalid
 
After a long search, I found an answer, well partially.

Before actually installing the package, run this command to get a list of files that will be installed:

% restore -Ta -vf {packagename}

After installing the package, ran 'lslpp -f {packagename}'. Then we can compare whether all files defined in the backup file (packagename} are successfully installed.

However, the only problem that I have now is that the 'restore' command requires a user interaction:

Code:
% restore -Ta -vf EMCpower_install
Please mount volume 1 on EMCpower_install.
        Press the Enter key to continue.

Note that in the above example, I was trying to install a EMC powerpath package. How do I avoid this? I need to write a tool to automate this process, so that I have to bypass any interaction steps.

Thanks for your help.
 
man restore... see -q flag

also you might want to check out the lppchk command (see man page or google for more info)


HTH,

p5wizard
 
Thank you, p5wizard! That's the answer!!

I just found out this and wanted to come here to update this and saw your post.

So, the correct cmd is:

% restore -Tlvqf {packagename}
or
% restore -Tavqf {packagename}

where {packagename} is a backup file.
 
I have a follow-up question on this one. I have noticed that a file's permission is changed from what's defined in a backup file after installation.

Take EMC's powerpath as an example. Before installation:

Code:
% restore -Tlvqf EMCpower_install | grep powermt
New volume on EMCpower_install:
Cluster size is 51200 bytes (100 blocks).
The volume number is 1.
The backup date is: Mon Jul 23 11:12:05 EST 2007
Files are backed up by name.
The user is root.
The number of archived files is 78.
[COLOR=red]-rwxr-xr-x- 29080    43093     Jul 23   2007        432623 ./usr/sbin/powermt[/color]
-rwxr-xr-x- 29080    43093     Jul 23   2007         93512 ./usr/share/man/man1/powermt.1

After installation:

Code:
% ls -l /usr/sbin/powermt
[COLOR=red]-r-x------    1 root     system       432623 Jul 23 2007  /usr/sbin/powermt[/color]

The permission has been changed from 755 to 500. Is there a reason behind this?

BTW, the install cmd I used is like this: "installp -agXd . EMCpower". The default umask for root is 022. I also changed it to '000' & '077'. It seemed to me that did not make any differences at all.

In addition, in the following line:

Code:
% restore -Tlvqf EMCpower_install | grep powermt
......
......
-rwxr-xr-x- [b]29080    43093[/b]     Jul 23   2007        432623 ./usr/sbin/powermt

What do '29080' and '43093' stand for? They do not look like uid and gid.

Thank you for your help.
 
The post-install script for any given software can do all kinds of stuff, including chown and chmod actions. So don't bet on the restore -T listing showing the same info as an ls -l listing after the install. I'd use lppchk to verify installation of a particular software.

And those strange numbers just mean that the backup was made by a user/group with those IDs. Your server doesn't know the UID and GID so it just shows the numeric IDs.


HTH,

p5wizard
 
Thank you so much, p5wizard, for your explaination.

But how to use lppchk? I guess that I could use one of following arguments:

-f Fast check (file existence, file length)
-c Checksum verification
-v Fileset version consistency check
-l File link verification

But, when I used them, nothing returned, e.g.

Code:
% lppchk -f EMCpower*
%

Does it mean "no message means good message"?

Thanks again.
 
Please read the man page for lppchk (especially the -m flag). But yes indeed, no news is good news...


HTH,

p5wizard
 
Thank you, Khalid & p5wizard!

Another follow-up question:

I noticed that after installation, there are three files not found in the file system:

1)./lpp_name
2)./usr/lib/boot/protoext/disk.proto.ext.scsi.pseudo.power
3)./usr/lpp/EMCpower/liblpp.a

I then did a bit search and found this IBM doc:General Programming Concepts: Writing and Debugging Programs. I think I got some kind of understanding about lpp_name & liblpp.a by reading the IBM doc. However, I am wondering how I can actually see the contents of these two files? There must be a cmd to list the contents, right? could you please tell me what these commands/arguments are?

In addition, I could not figure out what disk.proto.ext.scsi.pseudo.power is and why it is not found after installation.

Again, thanks for your help!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top