Software Distributor Administration Guide HP-UX 11i v1, 11i v2, and 11i v3 (5900-2561, March 2013)

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.
Configure scripts are for architecture-dependent actions because they will always be run on
the architecture of the install target.
Configure scripts are the best place for removing files and updating the IPD, since the system
is not in transition (i.e. as in an update).
A configure script can help with software updates as well as new installs. The script must also
be able to handle reinstallation and should include appropriate error control if data destruction
is possible.
11.5.6 Unconfigure Scripts
Unconfigure scripts are executed during the Unconfiguration-Configuration phase of a swremove
session. They can also be executed by the swconfig command. The pathname of the script
being executed is:
$ {SW_CONTROL_DIRECTORY}unconfigure
An unconfigure script is executed only for software installed into the primary root (“/”).
An unconfigure script is re-executed even when the product/fileset is in the configured state.
An unconfigure script is the primary way to move a product/fileset from the configured state
back to the installed state. The script should perform all (or most of) the activities needed to
disable the product/fileset for use.
An unconfigure script must undo all configuration tasks performed by its companion configure
script. The user should be able to configure, unconfigure, configure, etc. an installed
product/fileset and always end up with the same configured result.
11.5.7 Verify Scripts
Verify scripts are executed by the swverify command. The pathname of the script being executed
is:
$ {SW_CONTROL_DIRECTORY}verify
A verify script must not modify the system.
11.5 Execution of Control Scripts 219