An inactive boot environment is a copy of the operating environment, not the currently running system. A package to be used by Live Upgrade or the custom JumpStart program must follow these requirements:
Enable a custom JumpStart installation or upgrade with no user interaction
Make no modification of the current running system, which is necessary when using Solaris Live Upgrade
The following list explains the requirements for inactive boot environment compliance.
For an installation of an operating system to be successful, packages must recognize and correctly respect inactive boot environment specifiers.
Packages can include absolute paths in their pkgmap file (package map). If these files exist, they are written relative to the -R option of the pkgadd command. Packages that contain both absolute and relative (relocatable) paths can be installed to an alternative root (/) as well. $PKG_INSTALL_ROOT is prepended to both absolute and relocatable files so all paths are resolved properly when being installed by pkgadd.
Packages being installed using the pkgadd -R option or being removed using the pkgrm -R option must not alter the currently running system.
Any procedure scripts that are included in the packages being installed with the pkgadd command -R option or being removed using the pkgrm command -R option must not alter the currently running system. Any installation scripts that you provide must reference any directory or file prefixed with the $PKG_INSTALL_ROOT variable. The package must write all directories and files with the $PKG_INSTALL_ROOT prefix. The package must not remove directories without a $PKG_INSTALL_ROOT prefix. Table G–2 provides examples of correct scripting syntax.
Table G–2 Examples of Installation Script Syntax
$PKG_INSTALL_ROOT is the location of the root (/) file system of the machine to which you are adding the package. The location is set to the -R argument of the pkgadd command. For example, if the following command is invoked, then $PKG_INSTALL_ROOT becomes /a during the installation of the package.
# pkgadd -R /a SUNWvxvm |
$BASEDIR points to the relocatable base directory into which relocatable package objects are installed. Only relocatable objects are installed here. Non-relocatable objects (those that have absolute paths in the pkgmap file) are always installed relative to the inactive boot environment, but not relative to the $BASEDIR in effect. If a package has no relocatable objects, then the package is said to be an absolute package (or non-relocatable), and $BASEDIR is undefined and not available to package procedure scripts.
For example, suppose a package's pkgmap file has two entries:
1 f none sbin/ls 0555 root sys 3541 12322 1002918510 1 f none /sbin/ls2 0555 root sys 3541 12322 2342423332 |
The pkginfo file has a specification for $BASEDIR:
BASEDIR=/opt |
If this package is installed with the following command, then ls is installed in /a/opt/sbin/ls, but ls2 is installed as /a/sbin/ls2.
# pkgadd -R /a SUNWtest |