Operating System - HP-UX
1833995 Members
3294 Online
110063 Solutions
New Discussion

How do you edit output to swlist

 
SOLVED
Go to solution
Safdar Mustafa
Advisor

How do you edit output to swlist

Hi,

Does anyone know how to manually edit the output to swlist to display an entry which is not installed?

Meaning, I want to list some filesets as Configured which in fact are not on the node itself. The filesets do not need to be installed on this particular machine because it remotely mounts a filesystem from a SG cluster. But I do want it to be listed in swlist for consistency.

I hope that clear as mud :-)

Thanks, Safdar
7 REPLIES 7
Geoff Wild
Honored Contributor

Re: How do you edit output to swlist

You can't manipulate swlist directly.

However - you could create a "blank" depot which has a title of what you want to see.

Have a look at:

http://www.hpworks.org.uk/newsletter/articles/depots/

and

http://docs.hp.com/en/B2355-90740/index.html


Basically, make a psf file and then register it as a depot then swinstall it...

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Rodney Hills
Honored Contributor

Re: How do you edit output to swlist

What if you pipe the output from swlist to another command to add the entry you want-

swlist -s ... | perl -pe 'print "new line\n" if /^searchtext/' >/tmp/swlist.outputfile

HTH

-- Rod Hills
There be dragons...
Prashant Zanwar_4
Respected Contributor

Re: How do you edit output to swlist

interesting ! I vote for Geoff's way ! as then once your manipulate, you r done !

Prashant
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."
Antonio Cardoso_1
Trusted Contributor

Re: How do you edit output to swlist

Hi Mustapha,

I think you can create a psf file and register it using swreg command.
have a look at chapter "Registering and Unregistering Depots (swreg)" in http://docs.hp.com/en/B2355-90979/index.html for more detail
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: How do you edit output to swlist

This is truly Looney Tunes. If I were doing a security audit on your box and found this, you would get dinged big time -- because the installed software database has been intentionally altered. Before I could sign off on this box, I would insist that the entire machine be loaded from scratch because I absolutely cannot trust the installed software inventory. I see nothing good from doing this.

It makes much more sense to simply explain that the package is executed via NFS. You should also consider the impact of someone having to takeover in your absence; he would be clueless and assume as would I that swlist is telling the truth.
If it ain't broke, I can fix that.
Armin Kunaschik
Esteemed Contributor

Re: How do you edit output to swlist

The only advice I can give is not to do so! :-)

In case you're not willing:

try edit /var/adm/sw/products/INDEX!

This file is, from my knowledge, a summary of all INDEX files in all subdirectories of /var/adm/sw/products.

Add/delete/modify entries as you want but don't complain if you need to reinstall your server later!

Again, don't do this on production servers!

Armin
And now for something completely different...
Safdar Mustafa
Advisor

Re: How do you edit output to swlist

Thanks big time guys.

The first solution works well, although I agree that doing this for blank or empty depots is a bit looney :-)

Anyway, I will propose the different solutions but meanwhile I have learnt something new...

Thanks

Safdar