Software Distributor Administration Guide HP-UX 11i v1, 11i v2, and 11i v3 (5900-2488, September 2012)
For a product to be recoverable, no files should be removed by preinstall or postinstall scripts.
Configure scripts are a good place to remove obsolete files.
NOTE: Product level unpostinstall scripts are not supported.
• Configure Script
This script is run by swinstall or by swconfig to configure the host for the software, or
configure the software for host-specific information. For example, this script could change a
host’s specific configuration file such as /etc/services, add the host name or other host
resources such as available printers to its own configuration file, or perform compilations.
Configure scripts are run by swinstall for all products (in prerequisite order) after the
products have completed the Load phase. However, they are only run when installing to a
system that will actually be using the software. They are deferred when installing to an alternate
root (for example, for diskless or building test file systems) and run instead by the swconfig
command when the alternate root is now the root of the system using the software.
The swconfig command can also be used to rerun configure scripts that failed during a
normal install. A successful execution of the configure step (whether there is a script or not)
moves the software from the installed state to the configured or ready-to-use state. Configure
scripts (and all others) must be able to be run many times (that is, they must be re-executable).
Configure scripts are a good place to remove obsolete files.
Configure scripts are not run for installations to alternate roots.
• Verify Script
Verify scripts are run by the swverify command any time after the software has been installed
and configured. Like other scripts, they are intended to verify anything that the SD-UX software
management tools do not verify by default. For example, this script could check to see that
the software is configured properly and that you have a proper license to use it.
• Fix Script
Defines the fix script run by swverify to correct and report problems on installed software. The
fix script can create missing directories, correct file modifications (mode, owner, group, major,
and minor), and recreate symbolic links.
• Unconfigure Script
A script run by swconfig or swremove to undo a host or software configuration originally
performed by a configure script. For example, an unconfigure script could remove the
configuration from the /etc/services file. (The unconfigure task moves the software from
the configured state back to the installed state.)
Only the swremove command actually removes software, although you can run unconfigure
scripts using swconfig. Unconfigure scripts are not run for removals from alternate roots.
• Checkremove Scripts
The checkremove script is run by swremove during the remove analysis phase to allow any
checks before the software is permanently removed. For example, the script could check
whether anyone was currently using the software before removing it.
• Preremove Scripts
This script is executed just before removing files. It can be destructive to the application because
files will be removed next. It could remove files that the postinstall script created. For example,
a preremove script could save a specific fileset to another location before removing the rest
of the filesets in the product.
11.1 Introduction to Control Scripts 209