DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

pkgadd(ADM)


pkgadd -- transfer software package or set to the system

Syntax

   /usr/bin/pkgadd [-d device] [-r response] [-n] [-q] [-l] [-a admin]
   	[-p] [pkginst1 [pkginst2[. . .]]]
   

/usr/bin/pkgadd -s spool [-d device] [-q] [-l] [-p] [pkginst1 [pkginst2[. . .]]]

pkgadd -v

Description

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 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.

Error messages are always logged (see -l, below). In addition, when pkgadd terminates, it will send mail (by default, to root) with all the error messages and a summary of which packages installed completely, partially, or not at all. The following options are available.


-d device
Installs or copies a package/set from device. device can be: (a) the full pathname to a directory, file, or named pipe (such as /usr/tmp); (b) the device identifiers for tape or disk devices (such as /dev/rmt/* or /dev/dsk/*); (c) a device alias (such as diskette1); or (d) ``"-"'' which specifies packages in datastream format read from standard input. The default device is the installation spool directory (/var/spool/pkg).

For device identifiers, the device specified (either by pathname or alias), must have an entry in the device table (/etc/device.tab). If no entry exists in the device table, pkgadd will abort.

A device alias is the unique name by which a device is known. (For example, the alias for a cartridge tape drive might be ctape1.) The name must be limited in length to 64 characters (DDB_MAXALIAS) and can contain only alphanumeric characters and/or any of the following special characters: underscore (``_''), dollar sign (``$''), hyphen (``-''), and period (``.''). No two devices in the database can share the same alias.


-r response
Identifies a file or directory, response, which contains the answers to questions posed by a ``request script'' during a previous pkgask(ADM) session conducted in interactive mode When pkginst is a package, response can be a full pathname or a directory; when pkginst is a SIP, response must be a directory. For a complete description of request scripts and response files, see your system administration or software packaging guides.

-n
Installation occurs in non-interactive mode. The default mode is interactive.

-q
Installation is performed in quiet mode. Only prompts requesting user input and error messages are displayed on the screen.

-l
Error messages are not sent to the standard error output; they are only logged to /usr/adm/install/logs/pkginst.log.

-a admin
Defines the admin(F) installation administration file to be used in place of the default administration file to specify whether installation checks (such as the check on the amount of space, the system state, and so on) are done. The token none overrides the use of any admin file, and thus forces interaction with the user. Unless a full pathname is given, pkgadd looks in the /usr/adm/install/admin directory for the file. By default, the file default in that directory is used. default specifies that no checking will be done, except to see if there is enough room to install the package and if there are dependencies on other packages. The -a option cannot be used if pkginst is a SIP.

-p
Do not give the initial prompt to the user to insert the distribution medium. All other prompts will continue normally.

pkginst
A short string used to designate an abbreviation for the package/set name. (The term ``package instance'' is used loosely: it refers to all instantiations of pkginst.) See pkginfo(C) and pkginfo(F).

If pkginst is a SIP, the SIP controls installation of the set by using request scripts and preinstall scripts. The SIP request script, not the package installation tools, is responsible for prompting the user for responses and taking the appropriate actions. If the request script fails, only the SIP will be processed. For a complete description of request and preinstall scripts, see your system administration and/or software packaging guides.

To indicate all instances of a package, specify 'pkginst.*', enclosing the command line in single quotes, as shown, to prevent the shell from interpreting the * character. Use the token all to refer to all packages available on the source medium.


-s spool
Reads the package into the directory spool instead of installing it.

-v
Displays the version string of pkgadd.

Usage

You must be root to run pkgadd from the command line.

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. 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 option, name the directory in which these files reside.

The -n option will cause 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 won't reinstall these files on the system. If one of the package's installation scripts removes such a file, the result will be 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.

pkgadd may display the following message before exiting:

   UX:mailx: WARNING: No message
This is harmless and may be ignored.

Differences between versions

For SCO OpenServer Release 5.0.5a and later releases, this command is identical to the UnixWare 7 command of the same name. For earlier &ososr; releases, Set Installation Packages (SIPs) and the -q, -l, -p, and -v options are not supported.

Files


/etc/device.tab
device table

/usr/adm/install/admin/default
default package administration file

/usr/adm/install/logs/pkginst.log
error message log

/var/spool/pkg
default spool directory

/usr/lib/locale/locale/LC_MESSAGES/uxpkg
language-specific message file; see LANG on environ(M).

Exit codes


0
Successful completion of script.

1
Fatal error. Installation process is terminated at this point.

2
Warning or possible error condition. Installation will continue. A warning message will be 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.

References

admin(F), compver(F), copyright(F), depend(F), installf(ADM), pkgask(ADM), pkgchk(ADM), pkginfo(C), pkginfo(F), pkgmap(F), pkgparam(C), pkgrm(ADM), removef(ADM), setinfo(F), space(F)
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003