Software Distributor Administrator Guide (September 2010)
• 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 executed.
11.4.2.4 SW_LOCATION
• 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
11.4 Using Environment Variables 279