Checks the accuracy of an installation.
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 . . . ]]
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 defined above is used to list or check the contents and/or attributes of objects that are currently 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 using the pkgadd command with the -P option, contents and attributes can be checked or listed using the same alternative root directory path 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. Note that attributes cannot be checked for spooled packages.
The third synopsis is used to list or check the contents and/or attributes of objects which are described in the indicated Pkgmap.
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. Default is to check both. |
-c | Audits the file contents only, does not check file attributes. 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 already 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 should 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 created by and for a package;
it should contain only files 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 attributes and contents of files, use the -f, -x, -c, and -a flags together. |
-p | Only checks the accuracy of the pathname or pathnames listed. "pathname" can be one or more pathnames 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 spooled package resides. Device can be a directory pathname, or "-" which specifies packages in datastream format read from standard input. |
-m | Requests that the package be checked against the pkgmap file Pkgmap. |
-e | Requests that the pkginfo file named as Envfile be used to resolve parameters noted in the specified pkgmap file. |
Pkginst | Defines a short string used to designate an abbreviation for
the package name. (The term "package instance" is used loosely: it
refers to all instantiations of Pkginst, even those that do
not include instance identifiers.)
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. |
-P path | Requests that the package in the alternate root directory path be checked. |
Item | Description |
---|---|
0 | Successful completion of script. |
1 | Fatal error. Installation process is terminated at this point. |
Item | Description |
---|---|
/usr/sbin/pkgchk | Contains the pkgchk command. |