Software Distributor Administration Guide HP-UX 11i v1, 11i v2, and 11i v3 (5900-2561, March 2013)
• A verify script is the primary way to check the configuration tasks performed by a configure
script for correctness and completeness.
• A verify script is executed for installations into the primary root (“/”) or an alternate root.
Since most of the actions of this script will involve checking the current conditions of a
configured product/fileset (in the primary root), it may not need to perform any actions for a
product/fileset installed into an alternate root directory.
• An environment variable, SW_IS_COMPATIBLE, can help a verify script determine if installed
software is compatible with the system on which it is installed. See “SW_IS_COMPATIBLE”
(page 216).
11.5.8 Fix Scripts
• Fix scripts are executed by the swverify command. The pathname of the script being executed
is:
$ {SW_CONTROL_DIRECTORY}fix
• A fix script can be used to correct attribute problems detected by a verify script.
• A fix script can create missing directories, correct file modifications (mode, owner, group,
major, and minor), and recreate symbolic links.
11.5.9 Checkremove Scripts
• Checkremove scripts are executed during the Analysis phase of a swremove session. The
pathname of the script being executed is:
$ {SW_CONTROL_DIRECTORY}checkremove
• A checkremove script must not modify the system.
• A checkremove script determines whether the product/fileset can be removed by performing
checks beyond those performed by swremove. Example checks include checking to see if the
product/fileset is actively in use.
• If the checkremove script fails, no filesets in the product will be removed. The GUI/TUI interface
of swremove notifies you that the checkremove script has failed. You can then: diagnose the
problem, fix it, and re-execute the analysis phase; unselect the target system(s) in question; or
unselect the product/fileset. The command line interface notifies you for each individual
checkremove failure, and no filesets in that product are removed.
• A checkremove script is executed for installations into the primary root (“/”) or an alternate
root. Since most of the actions of this script will involve checking the current conditions of a
running system (that is, the primary root), it may not need to perform any actions when the
product/fileset is being removed from an alternate root.
11.5.10 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.
220 Using Control Scripts