Transfers a software package or set to the system.
pkgadd [ -d Device] [ -r Response] [ -n ] [ -a Admin] [ Pkginst1 [ Pkginst2 [. . .]]]
pkgadd -s Spool [ -d Device] [ Pkginst1 [ Pkginst2 [. . .]]]
pkgadd transfers the contents of a software package or set from the distribution medium or directory to install it onto the system. A package is a collection of related files and executables that can be independently installed. A set is made up of a special-purpose package, referred to as a Set Installation Package (SIP), and a collection of one or more packages that are members of the set. The SIP controls the installation of the set.
pkgadd checks that all packages listed on the command line are on the installation medium. If any of the packages listed does not exist, no changes are made to the system, that is, none of the listed packages are installed.
Used without the -d flag, pkgadd looks in the default spool directory for the package (/var/spool/pkg). Used with the -s flag, it writes the package to a spool directory instead of installing it.
Error messages are always logged. In addition, when pkgadd terminates, it sends mail (by default, to "root") with all the error messages and a summary of which packages installed completely, partially, or not at all.
The -r flag 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. Each package that had a request script would need a Response file. If you create response files with the same name as the package (for example, Package1 and Package2) then, after the -r flag, name the directory in which these files reside.
The -n flag causes the installation to halt if any interaction is needed to complete it.
When invoked with no Pkginst specified on the command line, pkgadd only displays the names of sets if at least one SIP exists on the media. Because of this, you shouldn't include packages on the same media if some are members of sets and some are not. If you do, the packages which are not members of sets can be installed only if their pkginst names are provided on the command line.
The pkgadd command checks to see if any of the files in Pkginst are already installed on the system and, if any are, saves this fact before continuing with installation. Later, pkgadd does not reinstall these files on the system. If one of the packages installation scripts removes such a file, the result is that the file will no longer be on the system when package installation completes.
The pkgadd command does not uncompress any files that were already compressed (that is, only those in ".Z" form) before being processed by pkgmk.
This command returns the following exit values:
0 | Successful completion of script. |
1 | Fatal error. Installation process is terminated at this point. |
2 | Warning or possible error condition. Installation continues. A warning message is displayed at the time of completion. |
3 | Script was interrupted and possibly left unfinished. Installation terminates at this point. |
4 | Script was suspended (administration). Installation terminates at this point. |
5 | Script was suspended (interaction was required). Installation terminates at this point. |
10 | System should be rebooted when installation of all selected packages is completed. (This value should be added to one of the single-digit exit codes described above.) |
20 | The system should be rebooted immediately upon completing installation of the current package. (This value should be added to one of the single-digit exit codes described above.) |
77 | No package was selected for the set. |
99 | Internal error. |
/var/sadm/install/admin/default | default package administration file |
/var/sadm/install/logs/pkginst.log | error message log |
/var/spool/pkg | default spool directory |
The pkgask command, pkgchk command, pkginfo command, pkgmk command, pkgparam command, pkgrm command.