Operating System - HP-UX
1755130 Members
2763 Online
108830 Solutions
New Discussion юеВ

cleanup command. HP-UX patch cleanup utility

 
SOLVED
Go to solution
Manuel P. Ron
Frequent Advisor

cleanup command. HP-UX patch cleanup utility

Why this command is not with HP-UX 11.11? Is there a command that replace it?
Thanks & Good fish (for points)
Crash programs fail because they are based on the theory that, with nine women pregnant, you can get a baby a month. - Wernher von Braun
2 REPLIES 2
Stefan Schulz
Honored Contributor

Re: cleanup command. HP-UX patch cleanup utility

Isn't cleanup only available as a Patch which you have to download and install seperately.

Of course i might be wrong, but i would check the available patches first.

Stefan
No Mouse found. System halted. Press Mousebutton to continue.
eran maor
Honored Contributor
Solution

Re: cleanup command. HP-UX patch cleanup utility

Hi

i check for a until in 11.11 to clean up patches like cleanup but i think there isnt .

i check all the docs that i have and also the sys_admin for 11.11 and there isnt any docs .

in 11.00 you need to install patch phco_19550 to have the option to use cleanup but i tried also to find a patch in 11.11 that will do it
didnt found .

think that you have found a bug in the 11.11

i m giving you a less nice way to cleanup patches ( i know that there isnt a lot of patches in 11.11 )

here is it :
To remove all superseded patch files from /var/adm/sw/save:

1. View the list of superseded patches:

swlist -l patch -a patch_state |grep superseded > /tmp/file

2. Modify /tmp/file (via vi, awk, or cut commands):

A. Remove all lines except each PHXX.XXXXX listed only once.

B. Remove the # in front of the PHXX.XXXXX.

C. Replace everything after the PHXX_XXXXX with .*

For example, after you edit the edit, the file should look
similar to the following:

# more /tmp/file
PHCO_13811.*
PHCO_16345.*

3. Commit the patches:

swmodify -x patch_commit=true -f /tmp/file

--OR--

Remove a single patch.

This is an example of removing superseded patch [PHCO_16405/PACHRDME/English] :

A. Execute the swlist -l patch -a patch_state |grep 16405
command to produce this output:

PHCO_16405.ADMN-ENG-A-MAN,l=/,r=1.0,a=HP-UX_B.11.00_32/64,
v=HP,fa=HP-UX_B.11.00_32/64 superseded

PHCO_16405.SYS-ADMIN,l=/,r=1.0,a=HP-UX_B.11.00_32/64,v=HP,
fa=HP-UX_B.11.00_32/64 superseded

PHCO_16405.UX-CORE,l=/,r=1.0,a=HP-UX_B.11.00_32/64,v=HP,
fa=HP-UX_B.11.00_32/64 superseded

#PHCO_16405
#PHCO_16405.ADMN-ENG-A-MAN superseded
#PHCO_16405.SYS-ADMIN superseded
#PHCO_16405.UX-CORE superseded

B. Execute swmodify -x patch_commit=true PHCO_16405.*
to change the patch_state to committed, as can be seen with
the swlist command:

swlist -l patch -a patch_state | grep 16405

PHCO_16405.ADMN-ENG-A-MAN,l=/,r=1.0,a=HP-UX_B.11.00_32/64,
v=HP,fa=HP-UX_B.11.00_32/64committed
PHCO_16405.SYS-ADMIN,l=/,r=1.0,a=HP-UX_B.11.00_32/64,v=HP,
fa=HP-UX_B.11.00_32/64 committed
PHCO_16405.UX-CORE,l=/,r=1.0,a=HP-UX_B.11.00_32/64,v=HP,
fa=HP-UX_B.11.00_32/64 committed
#PHCO_16405
#PHCO_16405.ADMN-ENG-A-MAN committed
#PHCO_16405.SYS-ADMIN committed
#PHCO_16405.UX-CORE committed

After the swmodify command is issued, the entire directory
/var/adm/sw/save/PHCO_16405 no longer exists, which explains why the
system can never be rolled back to that patch.

love computers