The following four groups of environment variables are available to all installation scripts. Some of the environment variables can be modified by a request or checkinstall script.
The 19 standard parameters that can be defined in the pkginfo file. Of these, the request or checkinstall script can only modify the CLASSES
and the BASEDIR
parameters. The standard installation parameters are described in detail in the pkginfo(4) man page.
The BASEDIR
parameter can only be modified with the Solaris 2.5 and later releases.
You can define your own installation environment variables by assigning values to them in the pkginfo file. Such environment variables must be alphanumeric with initial capital letters. Any of these environment variables can be changed by a request or checkinstall script.
Both a request script and a checkinstall script can define new environment variables by assigning values to them and putting them in the installation environment.
Table 3-2 lists environment variables that are available to all installation scripts through the environment. None of these can be modified by a script.
Table 3-2 Package Environment Variables Available to Scripts
Environment Variable |
Description |
---|---|
|
The base directory with respect to the target system. While |
|
The directory where the package now being read is located. If the package is being read from a tape, this will be the location of a temporary directory where the package has been transferred into directory format. In other words, assuming there is no extension to the package name (for example, SUNWstuff.d), the request script for the current package would be found at $INST_DATADIR/$PKG/install. |
|
The search list used by sh to find commands on script invocation. |
|
The instance identifier of the package being installed. If another instance of the package is not already installed, the value is the package abbreviation (for example, SUNWcadap). Otherwise, it is the package abbreviation followed by a suffix, such as SUNWcadap.4. |
|
The directory where files can be saved for use by removal scripts or where previously saved files can be found. Available only in the Solaris 2.5 and later releases. |
|
The root file system on the target system where the package is being installed. It exists only if the pkgadd and pkgrm commands were invoked with the -R option. This conditional existence facilitates its use in procedure scripts in the form ${PKG_INSTALL_ROOT}/somepath. |
|
Is an environment variable that gets set if the pkgadd and pkgrm commands were invoked with the -M and -R options. This environment variable is passed to any package installation script or package command that is part of the package environment. |
|
This environment variable does not exist under most installation environments. If it does exist (with the value yes), it means that a package with the same name, version, and architecture is already installed on the system or that this package is overwriting an installed package of the same name at the direction of the administrator. In these events, the original base directory is always used. |