Software Distributor Administration Guide HP-UX 11i v1, 11i v2, and 11i v3 (5900-2561, March 2013)

Defines the location of the product, which may have been changed from the default product
directory (if the product is locatable).
When installing to (or removing from) the primary root directory (“/”), this variable is the
absolute path to the product directory. For operations on an alternate root directory, the
variable must be prefixed by SW_ROOT_DIRECTORY to correctly reference product files.
If a product is not locatable, then the value of SW_LOCATION will always be the default
product directory defined when the product is packaged.
11.4.2.5 SW_PATH
The search path for commands. A PATH variable defines the minimum set of commands
available for use in a control script (for example, /sbin:/usr/bin:/usr/ccs/sbin).
A control script should always set its own PATH variable, and the PATH variable must begin
with $SW.PATH. The PATH should be set as follows:
PATH=$SW_PATH
export PATH
Additional directories, like /usr/local/bin, can be appended to PATH, but you must make
sure that the commands in those directories exist.
11.4.2.6 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
11.4.2.7 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.
11.4.2.8 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.)
11.4.3 Variables That Affect swinstall and swremove
11.4.3.1 SW_DEFERRED_KERNBLD
This variable is normally unset. If it is set, the actions necessary for preparing the system file
11.4 Using Environment Variables 215