pkgchk Command
Purpose
Checks the accuracy of an installation.
Syntax
- To Check the Contents of Installed Objects
-
pkgchk [ -l | -a -c -f -q -v ] [ -n -x ] [ -P path ] [ -p Path1[,Path2 . . . ] [ -i File] [ Pkginst . . . ] - To Check the Contents of a Package Spooled on a Specified Device
-
pkgchk -d Device [ -l | -v ] [ -p Path1[,Path2 . . . ] [ -i File] [ Pkginst . . . ] - To Check the Contents of a Package Described in the Specified pkgmap
-
pkgchk -m Pkgmap [ -e Envfile] [ -l | -a -c -f -q -v ] [ -n -x ] [ -i File] [ -p Path1[,Path2 . . . ]]
Description
pkgchk Checks the accuracy of installed files or by use of the
-l flag, displays information about package files. The command checks the
integrity of directory structures and the files. Discrepancies are reported on
stderr along with a detailed explanation of the problem.
The first synopsis that is defined above is used to list or check the contents
and/or attributes of objects that are installed on the system. Package names can be
listed on the command line, or by default the entire contents of a machine is checked. If packages
are installed in an alternative root directory path by using the pkgadd command
with the -P option, contents and attributes can be checked or listed by using
the same alternative root directory path that is specified with the -P option.
The second synopsis is used to list or check the contents of a package, which has been spooled on the specified device, but not installed. Attributes cannot be checked for spool packages.
The third synopsis is used to list or check the contents and/or attributes of
objects, which are described in the indicated Pkgmap.
Flags
| Item | Description |
|---|---|
| -l | Lists information on the selected files that make up a package. It is not compatible with the
a, c, f, g, and v flags. |
| -a | Audits the file attributes only, does not check file contents. The default is to check both. |
| -c | Audits the file contents only, does not check file attributes. The default is to check both. |
| -f | Corrects file attributes if possible. If used with the -x flag, it removes hidden files. When pkgchk is invoked with this flag it creates directories, named pipes, links, and special devices if they do not exist. |
| -q | Enables quiet mode. Does not give messages about missing files. |
| -v | Enables verbose mode. Files are listed as processed. |
| -n | Ignores volatile or editable files. This flag must be used for most post-installation checking. |
| -x | Searches exclusive directories only, looking for files that exist that are not in the
installation software database or the indicated Pkgmap file. (An exclusive
directory is a directory that is created by and for a package; it must contain only files that are
delivered with a package. If any non-package files are found in an exclusive directory,
pkgchk reports an error.) If -x is used with the
-f flag, hidden files are removed; no other checking is done. Note: To remove hidden files only, use the -f and -x
flags together. To remove hidden files and check the attributes and contents of files, use the
-f, -x, -c, and
-a flags together.
|
| -p | Checks the accuracy of the pathname or pathnames listed. pathname can be one or more pathnames that are separated by commas (or by white space, if the list is quoted). |
| -i | Reads a list of pathnames from File and compares this list against the
installation software database or the indicated Pkgmap file. Pathnames that are
not contained in inputfile are not checked. |
| -d | Specifies the device on which a spool package resides. Device can be a
directory pathname, or - that specifies packages in datastream format that is read
from standard input. |
| -m | This flag checks the package against the pkgmap file Pkgmap. |
| -e | Requests that the pkginfo file named as Envfile is used to resolve parameters noted in the specified pkgmap file. |
| Pkginst | Defines a short string that is used to designate an abbreviation for the package name. (The
term package instance is used loosely: it refers to all instantiations of
Pkginst, even that do not include instance identifiers.) To indicate all
instances of a package, specify ' |
| -P path | This flag checks for the package in the alternative root directory path. |
Exit Status
| Item | Description |
|---|---|
| 0 | Successful completion of script. |
| 1 | Fatal error. The installation process is terminated. |
Files
| Item | Description |
|---|---|
| /usr/sbin/pkgchk | Contains the pkgchk command. |