Software Distributor Administration Guide for HP-UX 11i
Using Control Scripts
Execution of Control Scripts
Chapter 11 389
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).