swpackage.4 (2010 09)
s
swpackage(4) swpackage(4)
control_file scripts/script2=configure
• You can define the physical name of a control script in a depot. This lets you define a control file
with a filename different than its tag, lets multiple control scripts point at the same file, and lets
a single script contain steps for all scripts. (The
SW_CONTROL_TAG environment variable tells
the script which tag is being executed.) For example, the following specification defines the same
file for use by multiple scripts:
checkinstall scripts/myscript common
checkremove scripts/myscript common
control_file scripts/myscript=preinstall common
control_file scripts/myscript=configure common
SD supports the following types of control scripts:
checkinstall
Defines the installation check script executed by
swinstall. This script is executed during
the analysis of each target, and it checks that the installation can be attempted. If the product
or fileset check script returns 1 (
ERROR), the product or fileset (respectively) will not be
installed. If it returns 11 (
GLOBAL_ERROR
), no products will be installed.
checkremove
Defines the remove check script executed by swremove. This script is executed during the
analysis of each target, and it checks that the remove can be attempted. If the check script
returns 1 (ERROR), the product or fileset will not be removed.
control_file
Defines an arbitrary control file to be included with the product or fileset and stored alongside
the named control files. It is used to include a subscript called by the named scripts or a data
file read by these scripts. If the optional tag component of the value is not specified,
swpackage uses the basename of the source filename as the tag for the control file.
Otherwise, the tag value is used.
configure
Defines the configuration script executed by swinstall and swconfig. This script
configures the target host for the product or fileset (and the product or fileset for any required
information about the target host).
fix Defines the fix script run by swverify to correct and report problems on installed software.
The fix script can create missing directories, correct file modifications (mode, owner, group,
major, and minor), and recreate symbolic links.
postinstall
Defines the installation post-load script executed by swinstall. A fileset script is executed
immediately after the fileset files are loaded. A product script is executed after all filesets for
that product have been installed.
postremove
Defines the post-remove script executed by swremove. A fileset script is executed immedi-
ately after the fileset files are removed. A product script is executed after all filesets for that
product have been removed.
preinstall
Defines the installation pre-load script executed by swinstall. A fileset script is executed
immediately before the fileset files are loaded. A product script is executed before any filesets
for that product have been installed.
preremove
Defines the pre-remove script executed by swremove. A fileset script is executed immediately
before the fileset files are removed. A product script is executed before any filesets for that
product have been removed.
request
The only script that may be interactive. This script may be run by swask, swinstall,or
swconfig after selection and before the analysis phase in order to request information from
the administrator that will be needed for the configure_script when that script is run later.
The request_script writes all information into the response_file, which the scripts can then use.
18 Hewlett-Packard Company − 18 − HP-UX 11i Version 3: September 2010