Software Distributor Administrator Guide (September 2010)

11.5.4 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).
11.5.5 Configure Scripts
Configure scripts are executed during the Configuration phase of a swinstall
session. SD expects configure scripts at system start-up if the swinstall session
triggers a system reboot. The swconfig command can also execute configure
scripts. The pathname of the script being executed is:
$ {SW_CONTROL_DIRECTORY}configure
A configure script is only executed for installations into the primary root (“/”). If
you choose to defer configuration in the swinstall session, then the configure
script will be executed by a swconfig session at some time after the installation
completes.
A configure script is usually executed only when the product/fileset is in the
installed state.
A configure script is the primary way to move a product/fileset from the installed
state to the configured state. The script should perform all (or most of) the activities
needed to enable the product/fileset for use.
A configure script can use configuration information provided by the user and
collected by a request script.
When an existing version of a product is updated to a new version, the configure
script(s) for the new version must perform any unconfigurations-configurations
of the old version that are necessary to properly configure the new version. The
unconfigure script(s) for the old version are not executed.
284 Using Control Scripts