|
||||||||||||||||||||||||||||
Part I Upgrading With Solaris Live Upgrade 1. Where to Find Solaris Installation Planning Information 2. Solaris Live Upgrade (Overview) 3. Solaris Live Upgrade (Planning) 4. Using Solaris Live Upgrade to Create a Boot Environment (Tasks) 5. Upgrading With Solaris Live Upgrade (Tasks) 6. Failure Recovery: Falling Back to the Original Boot Environment (Tasks) 7. Maintaining Solaris Live Upgrade Boot Environments (Tasks) 8. x86: Locating the GRUB Menu's menu.lst File (Tasks) 9. Upgrading the Solaris OS on a System With Non-Global Zones Installed 10. Solaris Live Upgrade (Examples) 11. Solaris Live Upgrade (Command Reference) B. Additional SVR4 Packaging Requirements (Reference) Preventing User Interaction When Installing or Upgrading |
Preventing Modification of the Current OSFollowing the requirements in this section keeps the currently running OS unaltered. Using Absolute PathsFor an installation of an operating system to be successful, packages must recognize and correctly respect alternate root (/) file systems, such as a Solaris Live Upgrade inactive boot environment. 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 (/) file system as well. $PKG_INSTALL_ROOT is prepended to both absolute and relocatable files so all paths are resolved properly when being installed by pkgadd. Using the pkgadd -R CommandPackages being installed by using the pkgadd -R option or being removed using the pkgrm -R option must not alter the currently running system. This feature is used by custom JumpStart, Solaris Live Upgrade, non-global zones and diskless client. Any procedure scripts that are included in the packages being installed with the pkgadd command -R option or being removed by 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 that is 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 B-1 provides examples of script syntax. Table B-1 Examples of Installation Script Syntax
Differences Between $PKG_INSTALL_ROOT and $BASEDIR Overview$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. Nonrelocatable 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 nonrelocatable), 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 Guidelines for Writing ScriptsYour package procedure scripts must be independent of the currently running OS to prevent modifying the OS. Procedure scripts define actions that occur at particular points during package installation and removal. Four procedure scripts can be created with these predefined names: preinstall, postinstall, preremove, and postremove. Table B-2 Guidelines For Creating Scripts
Maintaining Diskless Client CompatibilityPackages must not execute commands delivered by the package itself. This is to maintain diskless client compatibility and avoids running commands that might require shared libraries that are not installed yet. Verifying PackagesAll packages must pass pkgchk validation. After a package is created and before it is installed, it must be checked with the following command. # pkgchk -d dir_name pkg_name
After a package is created, it must be tested by installing it in an alternate root (/) file system location by using the -R dir_name option to pkgadd. After the package is installed, it must be checked for correctness by using pkgchk, as in this example. # pkgadd -d . -R /a SUNWvxvm # pkgchk -R /a SUNWvxvm No errors should be displayed. Example B-2 Testing a Package on /export/SUNWvxvmIf a package exists at /export/SUNWvxvm, then you would issue the following command. # pkgchk -d /export SUNWvxvm No errors should be displayed. Other commands can check the package when you are creating, modifying, and deleting files. The following commands are some examples.
# TEMPDIR=/a; export TEMPDIR # truss -t open /usr/sbin/pkgadd -R ${TEMPDIR} SUNWvxvm \ 2>&1 > /dev/null | grep -v O_RDONLY | grep -v \ 'open("'${TEMPDIR} |
|||||||||||||||||||||||||||
|