Software Distributor Administrator Guide (September 2010)
• 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 /stand/system cannot be accomplished from within the postinstall
scripts, but instead must be accomplished by the configure scripts. This occurs
whenever software is installed to a directory other than root(/).
• This variable should be read only by the configure and postinstall scripts of a
kernel fileset.
280 Using Control Scripts