Software Distributor Administration Guide for HP-UX 11i
Using Control Scripts
Execution of Control Scripts
Chapter 11 393
Preremove Scripts
• Preremove scripts are executed during the Remove phase of a
swremove session. The pathname of the script being executed is:
$ {SW_CONTROL_DIRECTORY}preremove
• All preremove scripts for a product are executed immediately before
the product’s files are removed.
• A preremove script should perform specific tasks preparatory to the
files being removed. The swremove session will proceed with
removing the files regardless of the return value from a preremove
script. Example actions include removing files created in the
postinstall script.
• A preremove script is executed for installations into the primary root
(“/”) or an alternate root. The scope of actions of a preremove script
should be within the product itself (that is, the files within the
product’s directory).
• The de-customization or unconfiguration-configuration tasks which
must be performed to disable the product/fileset for general use must
not be done in a preremove script, instead they should be done in an
unconfigure script (described above).
Postremove Scripts
• Postremove scripts are executed during the remove phase of a
swremove session. The pathname of the script being executed is:
$ {SW_CONTROL_DIRECTORY}postremove
• All postremove scripts for a product are executed immediately after
the product’s fileset files are removed.
• A postremove script should perform specific tasks related to the files
just removed. The swremove session will proceed with the remainder
of the session regardless of the return value from a postremove
script. Example actions include:
— Removing any files still remaining after preremove and the
swremove file removal have completed.
— Removal of directories wholly owned by the fileset and which
have been emptied by the file removal.