Operating System - HP-UX
1844094 Members
2882 Online
110227 Solutions
New Discussion

Depots Removed - Swlist not happy !!

 
Gary King_1
Occasional Advisor

Depots Removed - Swlist not happy !!

Hi Folks,

Some plank (Not me !!) has removed all the software depots off a machine..Therfore swlist et al are not happy...

How can I figure what SW & partches are on the box without the depots ??

Rgds.....
I don't get paid enough for this.......
29 REPLIES 29
David Burgess
Esteemed Contributor

Re: Depots Removed - Swlist not happy !!

To see what's installed take a look at the output from :-

/usr/sbin/swlist -l fileset | more
/usr/sbin/swlist -l bundle | more
/usr/sbin/swlist | more

Also see man swlist

HTH

Dave.
Christopher McCray_1
Honored Contributor

Re: Depots Removed - Swlist not happy !!

Hello,

Have you tried the check_patches command?

It will analyze your patches and report errors, warnings, etc. in a file /tmp/check_patches.report

Hope this helps

Chris
It wasn't me!!!!
Gary King_1
Occasional Advisor

Re: Depots Removed - Swlist not happy !!

Hi Dave - Get the following from swlist :
# swlist -l fileset
# Initializing...
# Contacting target "charter1"...
ERROR: The expected depot or root does not exist at "/".
ERROR: There is currently no installed software on host "charter1" at
location "/".
I don't get paid enough for this.......
David Burgess
Esteemed Contributor

Re: Depots Removed - Swlist not happy !!

Are you saying someone has deleted /var/adm/sw?
If so can you restore it from tape?

Regards,

Dave.
S.K. Chan
Honored Contributor

Re: Depots Removed - Swlist not happy !!

# swlist -l bundle
==>list installed bundles
# swlist -l product
==>list installed products
# swlist -l fileset
==>list installed filesets

OR

If you're running 11.0, install PHCO_24347 and run ..

# show_patches -a




Jeffrey Davis_1
Frequent Advisor

Re: Depots Removed - Swlist not happy !!

Hi Gary. I agree with the above. Use 'swlist' and 'check_patches' to check the total and active patches on your system.
Just keep in mind if 'check_patches' reports any problems and you use 'swverify' to assist you, swverify may give you eroneous messages with UX11.00. This is the latest I hear from the HP support group.
Gary King_1
Occasional Advisor

Re: Depots Removed - Swlist not happy !!

Chris,

check_patches recons there are no installed patches - I know for sure that this machine has been patched....

Rgds,

BRian
I don't get paid enough for this.......
David Burgess
Esteemed Contributor

Re: Depots Removed - Swlist not happy !!

Did you check /var/adm/sw?

Regards,

Dave.
Gary King_1
Occasional Advisor

Re: Depots Removed - Swlist not happy !!

Dave,

/var/adm/sw is there....

Some of contents.... 639 Nov 7 1997 getdate.templ
0 Sep 23 1999 host_object
0 Mar 2 11:58 host_object_np
357 Mar 2 13:07 needs_config.prev
80 Sep 23 1999 needs_remove.prev
14336 Mar 7 09:12 products
1024 Sep 28 1999 queue
12288 Mar 7 09:07 save
96 Feb 21 2000 save-custom
96 Mar 2 11:59 save_custom
1024 Apr 16 2000 security
96 Jul 20 2001 sessions
96 Sep 23 1999 software
270700 May 1 10:04 swagent.log
91094 May 1 10:23 swagentd.log
217255 Mar 2 13:16 swconfig.log
3544 May 1 10:23 swcopy.log
264280 May 1 10:04 swinstall.log
32790 Mar 2 11:43 swmodify.log
745 Apr 16 2000 swreg.log
64722 Feb 19 17:08 swremove.log
42 Mar 2 11:58 target_hosts
96 Sep 23 1999 targets
96 Sep 28 1999 ui

Rgds,

Brian
I don't get paid enough for this.......
Jeffrey Davis_1
Frequent Advisor

Re: Depots Removed - Swlist not happy !!

What was the result from running the 'swlist' command? If there are patches installed this will reflect it.
What 'depot' specifically did somebody remove?
As long as it was not /var/adm/sw you should be ok. Unless you installed patches against an alternate root system.
James R. Ferguson
Acclaimed Contributor

Re: Depots Removed - Swlist not happy !!

Hi Gary:

An item that I don't see is the 'var/adm/sw/patch/' directory. Try reloading it from your backup tape.

Regards!

...JRF...
Christopher McCray_1
Honored Contributor

Re: Depots Removed - Swlist not happy !!

Hello, again

Look in the directories under /var/adm/sw, particularly products and save. Is there anythng there?

That may be a place where your "coworker" was cleaning house. restore from tape.

Good luck

Chris
It wasn't me!!!!
S.K. Chan
Honored Contributor

Re: Depots Removed - Swlist not happy !!

Check /var/adm/sw/products for a file called "INDEX", if that file does not exist (maybe accidently removed then this could be the cause). If it does not exist of the content is empty, then do this to rebuild it. Basically trick the system into thinking that you're installing some fileset and that will force it to recreate the INDEX file.

# cd /tmp
# vi dummy.psf
===> the content should look like this ..
product
tag void
fileset
tag void

# swpackage -s /tmp/dummy.psf
# swinstall dummy
# swremove dummy
# rm dummy.psf
# swremove -d dummy

Now try the swlist command again ..

David Burgess
Esteemed Contributor

Re: Depots Removed - Swlist not happy !!

Got it!

You're mising /var/adm/sw/products/INDEX

If I do :-

/var/adm/sw/products > mv INDEX dave.INDEX

root:server1:
/var/adm/sw/products > swlist
# Initializing...
# Contacting target "server1"...
ERROR: The expected depot or root does not exist at "/".
ERROR: There is currently no installed software on host "server1" at
location "/".


Restore /var/adm/sw/products/INDEX from a backup and your set.

Good luck

Dave.
Gary King_1
Occasional Advisor

Re: Depots Removed - Swlist not happy !!

Ok - the scenario was this...

A couple of months ago, a third party company patched this box for Oracle V8.17....Prior to this, swlist/install/remove etc worked just fine

I think, looking in the logs, that they dumped the patches in /tmp/patches and installed from there....

I haven't got a clue what they did then, or what they deleted or changed....

Now when I run swlist, because I need the info, I get the error message above....

Rgds.....

I don't get paid enough for this.......
Jeffrey Davis_1
Frequent Advisor

Re: Depots Removed - Swlist not happy !!

As I'm sure you're aware. A cardinal rule of thumb for administration. Either do it yourself or oversee it.
Jeffrey Davis_1
Frequent Advisor

Re: Depots Removed - Swlist not happy !!

Ok. So what dir's are in /tmp or under /tmp/patches. Can you run 'swlist' and point it to the alternate root of /tmp/patches.
man swlist look at alternate root. Try that.
David Burgess
Esteemed Contributor

Re: Depots Removed - Swlist not happy !!

Did you check /var/adm/sw/products/INDEX ?

Regards,

Dave.
Gary King_1
Occasional Advisor

Re: Depots Removed - Swlist not happy !!

Hi SKS....

Get your drift !!
But....Swpackage comes back with :

WARNING: Incomplete definition for the fileset "void", beginning atline 3. The following attributes are not defined:
files

the files contained in the fileset


I don't get paid enough for this.......
S.K. Chan
Honored Contributor

Re: Depots Removed - Swlist not happy !!

I'm sorry Gary, my head is not thinking clearly ..

DO this ..

change "void" to "dummy"
S.K. Chan
Honored Contributor

Re: Depots Removed - Swlist not happy !!

dummy.psf looks like this :-
product
tag dummy
fileset
tag dummy
I've tested and it works .. remember to assign points, it'll help you (your profile) in a long run. :)

John Duxbury
New Member

Re: Depots Removed - Swlist not happy !!

Hi....This is Gary - Had to change ID's..

Thats exactly what I have but swpacksge returns the following :

WARNING: Incomplete definition for the fileset "dummy", beginning at
line 3. The following attributes are not defined:
files the files contained in the fileset

S.K. Chan
Honored Contributor

Re: Depots Removed - Swlist not happy !!

No worries ! The error simply tells you your definition is incomplete, proceed with the rest of the steps .. swinstall is next..
John Duxbury
New Member

Re: Depots Removed - Swlist not happy !!

Doh.....

Doesn't like korn shells, does it !!

The commands run Ok now but there is still no

/var/adm/sw/INDEX and the var/adm/sw/products directory seems to have done a runner !!

swlist returns the same errors...

EEEKK....