HP-UX Reference (11i v1 00/12) - 4 File Formats (vol 8)

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man4/!!!intro.4
________________________________________________________________
___ ___
s
swpackage(4) swpackage(4)
(Hewlett-Packard Company)
Control Script Specification
Control scripts are often referred to as control_files, although control_files may include non-script files such
as space files, INDEX files, and INFO files.
Control_file syntax is:
control_file source[=tag][filename]
Where tag is the script name.
You can also list each item on a separate line:
control_file
source
filename
tag tag_name
The following is an example of control script specifications:
checkinstall scripts/checkinstall
checkremove scripts/checkremove
configure scripts/configure
fix scripts/fix
postinstall scripts/postinstall
postremove scripts/postremove
preinstall scripts/preinstall
preremove scripts/preremove
request scripts/request
unconfigure scripts/unconfigure
unpostinstall scripts/postinstall
unpreinstall scripts/preinstall
verify scripts/verify
space space
For control scripts:
Each script specification defines a control script object. The value of each keyword is the source
filename for the control le.
Control scripts are optional. If present, swpackage copies the specified source filename into
the depot’s storage directory for the associated product or fileset.
You can use the keyword
control_file to define scripts or subscripts. If the basename of
the source path is a standard keyword, then SD executes that script. For example:
control_file scripts/script1=checkinstall
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.
HP-UX Release 11i: December 2000 16 Section 4301
___
___