Software Distributor Administration Guide for HP-UX 11i

Using Control Scripts
Execution of Control Scripts
Chapter 11394
A postremove script is executed for installations into the primary
root (“/”) and an alternate root. The scope of actions of a postremove
script should be within the product itself (that is, the files within the
product’s directory).
The de-customization or unconfiguration-configuration tasks which
must be performed to disable the product/fileset for general use
should not be done in the postremove script, instead they should be
done in the unconfigure script (described above).
Request Scripts
Request scripts are interactive scripts that request a response from
the user as part of software installation or configuration. The
pathname of the script being executed is:
$ {SW_CONTROL_DIRECTORY}request
Request scripts write information into a response file for later use by
the configure script or other scripts. You can run requests scripts by
executing the swask command or using the ask option with swinstall
or swconfig after selection and before the analysis phase.
The POSIX default for request scripts is a shell script. The shell
script must be able to:
Ask questions of the user.
Read the user’s answer.
List all current user responses in a redrawn screen.
Ask the user to confirm an answer and continue or to go back.
The request script stores the user response in a response file. The
path of the response file is accessible by the
SW_CONTROL_DIRECTORY environment variable.
The POSIX recommendation for response file format is the SVR4
model of attribute/value pairs. Answers should be written to the
response file in env_var=
value
format so that the response files can
be easily used by other control scripts.
When you use a request script to get install information, HP
recommends that you use a checkinstall script to check for proper
execution of the request script. The checkinstall script should: