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)
Each fileset or product may contain a space file. The space file lists a path and a byte size for each path:
/tmp/space_dummy1 2000
/opt/space_dummy2 2000
/tmp/space_dummy3 3000
/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).
SW_CONTROL_TAG
Holds the tag name of the control_file being executed. When packaging software, you can define
a physical name and path for a control file in a depot. This lets you define the control_file with a
name other than its tag and lets you use multiple control file definitions to point to the same file.
A control_file can query the SW_CONTROL_TAG variable to determine which tag is being exe-
cuted.
SW_LOCATION
Defines the location of the product, which may have been changed from the default product
directory. When combined with the SW_ROOT_DIRECTORY
, this variable tells scripts where
the product files are located.
SW_PATH
A PATH variable which defines a minimum set of commands available for use in a control script
(e.g.
/sbin:/usr/bin).
SW_ROOT_DIRECTORY
Defines the root directory in which the session is operating, either / or an alternate root direc-
tory. This variable tells control scripts the root directory in which the products are installed. A
script must use this directory as a prefix to SW_LOCATION to locate the product’s installed files.
The configure script is only run when SW_ROOT_DIRECTORY is /.
SW_SESSION_OPTIONS
Contains the pathname of a file containing the value of every option for a particular command,
including software and target selections. This lets scripts retrieve any command options and
values other than the ones provided explicitly by other environment variables. For example,
when the file pointed to by SW_SESSIONS_OPTIONS
is made available to a request script, the
HP-UX Release 11i: December 2000 − 18 − Section 4−−303
___
___