Software Distributor (SD-UX) Administration Guide HP-UX 11i v1, 11i v2, and 11i v3 (762797-001, March 2014)

Table Of Contents
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.
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).
Postinstall Scripts
Postinstall scripts are executed during the Load phase of a swinstall session. The pathname
of the script being executed is:
$ {SW_CONTROL_DIRECTORY}postinstall
The postinstall script for a product is executed immediately after the fileset’s files are installed.
A postinstall script should perform specific tasks related to the files just installed. The
swinstall session will proceed with the remainder of the session (for example, configuration)
regardless of the return value from a postinstall script. Example actions include adding a kernel
driver to the system file or moving a file from under /usr/newconfig to its correct place in
the file system.
A postinstall script is executed for installations into the primary root (“/”) or an alternate root.
The scope of actions of a postinstall script should be within the product itself (that is, the files
within the product’s directory).
The customization or configuration tasks that must be performed to enable the product/fileset
for general use should not be done in the postinstall script, but the configure script (described
below).
212 Using Control Scripts