Software Distributor Administrator Guide (September 2010)
11.5.2 Checkinstall Scripts
• Checkinstall scripts are executed during the Analysis phase of a swinstall
session. The pathname of the script being executed is:
$ {SW_CONTROL_DIRECTORY}checkinstall
• A checkinstall script must not modify the system.
• A checkinstall script determines whether the product/fileset can be installed by
performing checks beyond those performed by swinstall. Example checks
include checking to see if the product/fileset is actively in use, or checking that the
system run-level is appropriate.
• If you are using a request script as part of the install, the checkinstall script should:
— Verify that the response file exists.
— Prevent swinstall from “hanging” if:
◦ A script tries to read a response file that does not exist, or
◦ The install or configuration relies on information in the missing response
file.
• If the checkinstall script fails, the fileset will not be installed. The interactive
interface of swinstall will notify you that the checkinstall script has failed. Then
you can: diagnose the problem, fix it and re-execute the analysis phase; or unselect
the product/fileset. The non-interactive interface tells you about each individual
checkinstall failure and the filesets are not installed.
• A checkinstall 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 installed into an alternate
root.
11.5.3 Preinstall Scripts
• Preinstall scripts are executed during the Load phase of a swinstall session.
The pathname of the script being executed is:
$ {SW_CONTROL_DIRECTORY}preinstall
• The preinstall script for a product is executed immediately before the fileset’s files
are installed.
• A preinstall script should perform specific tasks preparatory to the files being
installed. The swinstall session will proceed with installing the files regardless
of the return value from a preinstall script. Example actions include removing
obsolete files (in an update scenario).
• A preinstall script is executed for installations into the primary root (“/”) or an
alternate root. The scope of actions of a preinstall script should be within the
product itself (that is, the files within the product’s directory).
11.5 Execution of Control Scripts 283