pkgadd - transfer software packages to the system
Keystore And Certificate Formats
Pass Phrase Arguments
pkgadd [-nv] [-R root_path] [-r response] [-d device | -d datastream pkginst | all] [pkginst | -Y category [, category]...]
pkgadd -s [-d device | -d datastream pkginst | all] [pkginst | -Y category [, category]...]
pkgadd transfers the contents of a software package from the distribution medium or directory to install it onto the system. Used without the -d device source specifier, pkgadd looks in the default spool directory (/var/spool/pkg) for the package. Used with the -s option, it writes the package to a spool directory instead of installing it.
The pkgadd utility requires an amount of temporary space the size of the package that is being installed. pkgadd determines which temporary directory to use by checking for the existance of the $TMPDIR environment variable. If $TMPDIR is not defined, pkgadd uses /var/tmp/.
Certain unbundled and third-party packages are no longer entirely compatible with the latest version of pkgadd. These packages require user interaction throughout the installation and not just at the very beginning, or require that their request scripts be run as the root user.
To install these older packages , set the following environment variable: NONABI_SCRIPTS=TRUE.
As long as this environment variable is set, pkgadd permits keyboard interaction throughout the installation and package request scripts are run as root.
-n Installation occurs in non-interactive mode. Suppress output of the list of installed files. The default mode is interactive. -r response Identify a file or directory which contains output from a previous pkgask(1M) session. This file supplies the interaction responses that would be requested by the package in interactive mode. response must be a full pathname. -R root_path Define the full path name of a directory to use as the root_path. All files, including package system information files, are relocated to a directory tree starting in the specified root_path. The root_path may be specified when installing to a client from a server (for example, /export/root/client1). -s spool Write the package into the directory spool instead of installing it. -v Trace all of the scripts that get executed by pkgadd, located in the pkginst/install directory. This option is used for debugging the procedural and non-procedural scripts. -d device By default, pkgadd looks in the /var/spool/pkg directory when searching for instances of a package to install or spool. Optionally, the source for the package instances to be installed or spooled can be specified: Install or copy a package from device. device can be any of the following:
o A full path name to a directory or the identifiers for tape, floppy disk, or removable disk (for example, /var/tmp or /floppy/floppy_name). o A device alias (for example, /floppy/floppy0). o A datastream created by pkgtrans (see pkgtrans(1)). -d datastream pkgname,... | all The second form of the -d specifier, above, indicates the syntax you use when specifying a datastream. In this case you must specify either a comma-separated list of package names or the keyword all.
By default, pkgadd searches the specified source, and presents an interactive menu allowing the user to select which package instances found on the source are to be installed. As an alternative, the package instances to be installed can be specified using:
pkginst The package instance or list of instances to be installed. The token all may be used to refer to all packages available on the source medium. The format pkginst.* can be used to indicate all instances of a package. The asterisk character (*) is a special character to some shells and may need to be escaped. In the C-Shell, the asterisk must be surrounded by single quotes (') or preceded by a backslash (\). -Y category[,category...] Install packages based on the value of the CATEGORY parameter stored in the package's pkginfo(5) file. All packages on the source medium whose CATEGORY matches one of the specified categories will be selected for installation or spooling.
Example 1 Installing a Package from a Solaris DVD
The following example installs a package from a Solaris DVD. You are prompted for the name of the package you want to install.
pkgadd -d /cdrom/cdrom0/s0/Solaris_10/Product
Example 2 Installing a Set of Packages from a Datastream
The example command shown below installs all of the packages in the datastream specified by the -d source specifier. Prior to this command, this datastream must have been created with the pkgtrans(1) command.
pkgadd -d /var/tmp/datastream all
The keyword all specifies that all of the packages found in the designated datastream will be installed.
0 Successful completion 1 Fatal error. 2 Warning. 3 Interruption. 4 Administration. 5 Administration. Interaction is required. Do not use pkgadd -n. 10 Reboot after installation of all packages. 20 Reboot after installation of this package.
/var/sadm/install/logs/ Location where pkgadd logs an instance of software installation.
pkginfo(1), pkgmk(1), pkgparam(1), pkgproto(1), pkgtrans(1), installf(1M), pkgask(1M), pkgchk(1M), pkgrm(1M), removef(1M), pkginfo(5)
When transferring a package to a spool directory, the -n option cannot be used.
The -r option can be used to indicate a directory name as well as a filename. The directory can contain numerous response files, each sharing the name of the package with which it should be associated. This would be used, for example, when adding multiple interactive packages with one invocation of pkgadd. In this situation, each package would need a response file. If you create response files with the same name as the package (for example, pkinst1 and pkinst2), then name the directory in which these files reside after the -r.
The -n option causes the installation to halt if any interaction is needed to complete it.
|Heirloom Packaging Tools||PKGADD (1M)||2/26/07|