HP-UX Reference (11i v3 07/02) - 4 File Formats (vol 8)
s
swpackage(4) swpackage(4)
the configure script.
unpostinstall
Defines the installation pre-restore script executed by
swinstall. A fileset script is executed
immediately before the fileset files are restored if there is an error and the
autorecover_product
option is set to true. Note that
unpostinstall scripts are sup-
ported for filesets only. It should undo the steps taken by the
postinstall script.
unpreinstall
Defines the installation post-restore script executed by
swinstall. A fileset script is executed
immediately after the fileset files are restored if there is an error and the
autorecover_product
option is set to true. A product script is executed after all filesets
for that product have been restored. It should undo the steps taken by the
preinstall
scripts.
verify
Defines the verification script executed by
swverify. This script verifies the configuration per-
formed by the
configure script.
Space Files
The space control_file is not a script. It lets you define additional disk space requirements for the filesets
and notes positive disk space impact on any directory or file that results from the actions of control scripts.
Each fileset or product may contain a space file. Comments are allowed starting with # character. The
space file lists a path and a byte size for each path:
#Reserve 2000 bytes in /tmp and /opt
/tmp/space_dummy1 2000
/opt/space_dummy2 2000
#Reserve another 3000 bytes in /tmp
/tmp/space_dummy3 3000
#Reserve 4000 in /mydir
/mydir/ 4000
For each directory or file path listed in the space file, swinstall adds the size in bytes to the disk space
requirements. The size reflects the maximum transient or permanent disk space required for the install.
Script Interpreter
By default, SD interprets scripts with a POSIX shell (
sh). Control scripts can also define their own inter-
preter in the first line of the script. You can use the interpreter keyword to define a different inter-
preter for specific scripts. The syntax is:
interpreter interpreter_name
For example:
control_file
source scripts
tag checkinstall
interpreter ksh
SD checks that the interpreter is available. If not, the script fails. If SD finds the interpreter, it processes
the script normally using the specified interpreter.
You can use a checkinstall script to verify the existence of any script interpreters that you specify.
Environment Variables for Scripts
The following environment variables affect scripts:
SW_CATALOG
Holds the path to the Installed Products Database (IPD), relative to the path in the
SW_ROOT_DIRECTORY environment variable. Note that you can specify a path for the IPD
using the installed_software_catalog default option.
SW_CONTROL_DIRECTORY
Defines the current directory of the script being executed, either a temporary catalog directory,
or a directory within in the Installed Products Database (IPD). This variable tells scripts where
other control scripts for the software are located (e.g. subscripts).
HP-UX 11i Version 3: February 2007 − 19 − Hewlett-Packard Company 459