Software Distributor Administration Guide for HP-UX 11i

Using Control Scripts
Using Environment Variables
Chapter 11384
SW_ROOT_DIRECTORY
Defines the root directory in which the session is operating, either “/”
or an alternate root directory. 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.
All control scripts (except for the configure and unconfigure scripts)
can be executed during an install or remove task on an alternate
root. If the scripts reference any product files, each reference must
include the {SW_ROOT_DIRECTORY} in the file pathname.
The scripts may only need to perform actions when installing to
(removing from) the primary root directory (“/”). If so, then the
SW_ROOT_DIRECTORY can be used to cause a simple exit 0 when
the task is operating in an alternate root directory:
if test "${SW_ROOT_DIRECTORY}" != "/"
then
exit 0
fi
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.
SW_SOFTWARE_SPEC
Contains the fully qualified software specification of the current
product or fileset. The software specification allows the product or
fileset to be uniquely identified. (Fully qualified software specs
include the r=, a=, and v= version components even if they contain
empty strings. For installed software, l= must also be included.)