|
System Administration Commands | pkgadd(1M) |
| pkgadd - Transfer software packages to the system |
SYNOPSIS
| pkgadd [-nv] [-a admin] [-d device] [ [-M] -R root_path] [-r response] [-V fs_file] [ pkginst ... | -Y category[,category...]] |
| pkgadd -s spool [-d device] [ 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 option, pkgadd looks in the default spool directory
for the package (var/spool/pkg). Used with the -s option, it writes the package to a spool directory instead of installing it.
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.
To install these older packages (released prior to Solaris 2.4), set the following environment variable: NONABI_SCRIPTS=TRUE
pkgadd permits keyboard interaction throughout the installation as long as this environment variable is set.
|
|
The following options are supported:
-
-a admin
- Define an installation administration file, admin, to be used in place of the default administration file. The token none overrides
the use of any admin file, and thus forces interaction with the user. Unless a full path name is given, pkgadd first looks in the current working directory for the administration file. If the specified administration file is not in the current working directory, pkgadd looks in the /var/sadm/install/admin directory for the administration file.
-
-d device
- Install or copy a package from device. device can be 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 ). It can also be a device alias (for example, /floppy/floppy0) or a datastream created by pkgtrans (see pkgtrans(1)).
- -M
- Instruct pkgadd not to use the $root_path/etc/vfstab file for determining the client's mount points. This option assumes the mount points are correct on the
server and it behaves consistently with Solaris 2.5 and earlier releases.
- -n
- Installation occurs in non-interactive mode. 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.
- -V fs_file
- Specify an alternative fs_file to map the client's file systems. For example, used in situations where the $root_path/etc/vfstab file is non-existent or unreliable.
- -Y category
- Install packages based on the value of the CATEGORY parameter stored in the package's pkginfo(4) file.
When executed without options or operands, pkgadd uses /var/spool/pkg (the default spool directory).
|
|
The following operands are supported:
-
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, "*" must be surrounded by single quotes (') or preceded by a backslash (\).
|
| Example 1. Installing a Package from a Solaris CD-ROM.
|
The following example installs a package from a Solaris CD-ROM. You are prompted for the name of the package you want to install.
|
example% pkgadd -d /cdrom/cdrom0/s0/Solaris_2.6
|
|
|
|
-
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.
|
|
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
Availability | SUNWcsu |
|
|
pkginfo(1), pkgmk(1), pkgparam(1), pkgproto(1), pkgtrans(1), installf(1M), pkgask(1M), pkgrm(1M), removef(1M), admin(4), pkginfo(4), attributes(5)
Application Packaging Developer's Guide
|
|
When transferring a package to a spool directory, the -r, -n, and -a options 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.
If the default admin file is too restrictive, the administration file may need to be modified to allow for total non-interaction during a package installation. See admin(4)
for details.
|
| |