'\" te .\" Copyright 1989 AT&T Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] .TH PKGCHK 8 "Oct 30, 2007" .SH NAME pkgchk \- check package installation accuracy .SH SYNOPSIS .LP .nf \fBpkgchk\fR [\fB-l\fR | \fB-acfnqvx\fR] [\fB-i\fR \fIfile\fR | -] [\fB-p\fR \fIpath\fR... | \fB-P\fR \fIpartial-path\fR...] [\fB-R\fR \fIroot_path\fR] [ [\fB-m\fR \fIpkgmap\fR [\fB-e\fR \fIenvfile\fR]] | pkginst... | \fB-Y\fR \fIcategory\fR,\fIcategory\fR\&.\|.\|.] .fi .LP .nf \fBpkgchk\fR \fB-d\fR \fIdevice\fR [\fB-l\fR | \fB-fv\fR] [\fB-i\fR \fIfile\fR | -] [\fB-M\fR] [\fB-p\fR \fIpath\fR]... [\fB-V\fR \fIfs_file\fR] [pkginst... | \fB-Y\fR \fIcategory\fR[,\fIcategory\fR\&.\|.\|.]] .fi .SH DESCRIPTION .sp .LP \fBpkgchk\fR checks the accuracy of installed files or, by using the \fB-l\fR option, displays information about package files. \fBpkgchk\fR checks the integrity of directory structures and files. Discrepancies are written to standard error along with a detailed explanation of the problem. .sp .LP 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, or in the indicated \fBpkgmap\fR. Package names may be listed on the command line, or by default, the entire contents of a machine will be checked. .sp .LP 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. .SH OPTIONS .sp .LP The following options are supported: .sp .ne 2 .na \fB\fB-a\fR\fR .ad .sp .6 .RS 4n Audit the file attributes only and do not check file contents. Default is to check both. .RE .sp .ne 2 .na \fB\fB-c\fR\fR .ad .sp .6 .RS 4n Audit the file contents only and do not check file attributes. Default is to check both. .RE .sp .ne 2 .na \fB\fB\fR\fB-d\fR \fIdevice\fR\fR .ad .sp .6 .RS 4n Specify the device on which a spooled package resides. \fIdevice\fR can be a directory path name or the identifiers for tape, floppy disk, or removable disk (for example, \fB/var/tmp\fR or \fB/dev/diskette\fR). .RE .sp .ne 2 .na \fB\fB\fR\fB-e\fR \fIenvfile\fR\fR .ad .sp .6 .RS 4n Request that the package information file named as \fIenvfile\fR be used to resolve parameters noted in the specified \fBpkgmap\fR file. .RE .sp .ne 2 .na \fB\fB-f\fR\fR .ad .sp .6 .RS 4n Correct file attributes if possible. If used with the \fB-x\fR option, this option removes hidden files. When \fBpkgchk\fR is invoked with this option, it creates directories, named pipes, links, and special devices if they do not already exist. If the \fB-d\fR option calls out an uninstalled package, the \fB-f\fR option will only take effect if the package is in directory (not stream) format. All file attributes will be set to agree with the entries in the \fBpkgmap\fR file except that setuid, setgid, and sticky bits will not be set in the mode. .RE .sp .ne 2 .na \fB\fB\fR\fB-i\fR \fIfile\fR | \fB-\fR\fR .ad .sp .6 .RS 4n Read a list of path names from \fIfile\fR or from stdin (\fB-\fR) and compare this list against the installation software database or the indicated \fBpkgmap\fR file. Path names that are not contained in \fIfile\fR or stdin are not checked. .RE .sp .ne 2 .na \fB\fB-l\fR\fR .ad .sp .6 .RS 4n List information on the selected files that make up a package. This option is not compatible with the \fB-a\fR, \fB-c\fR, \fB-f\fR, \fB-g\fR, and \fB-v\fR options. .RE .sp .ne 2 .na \fB\fB-m\fR \fBpkgmap\fR\fR .ad .sp .6 .RS 4n Check the package against the package map file, \fBpkgmap\fR. .RE .sp .ne 2 .na \fB\fB-M\fR\fR .ad .sp .6 .RS 4n Instruct \fBpkgchk\fR not to use the \fB$\fR\fIroot_path\fR\fB/etc/vfstab\fR 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. .RE .sp .ne 2 .na \fB\fB-n\fR\fR .ad .sp .6 .RS 4n Do not check volatile or editable files' contents. This should be used for most post-installation checking. .RE .sp .ne 2 .na \fB\fB\fR\fB-p\fR \fIpath\fR\fR .ad .sp .6 .RS 4n Check the accuracy only of the path name or path names listed. \fIpath\fR can be one or more path names separated by commas (or by whitespace, if the list is quoted). .sp To specify a \fIpath\fR that includes a comma, you must use the \fB-i\fR option, described above. See EXAMPLES. .RE .sp .ne 2 .na \fB\fB\fR\fB-P\fR \fIpartial-path\fR\fR .ad .sp .6 .RS 4n Check the accuracy of only the partial path name or path names listed. \fIpartial-path\fR can be one or more partial path names separated by commas (or by whitespace, if the list is quoted). This option can be used instead of \fB-p\fR and is not compatible with the other option. This option matches any path name that contains the string contained in the partial path. See the note about paths that contain commas in the description of \fB-p\fR. .RE .sp .ne 2 .na \fB\fB-q\fR\fR .ad .sp .6 .RS 4n Quiet mode. Do not give messages about missing files. .RE .sp .ne 2 .na \fB\fB-R\fR \fIroot_path\fR\fR .ad .sp .6 .RS 4n Define the full name of a directory to use as the \fIroot_path\fR. All files, including package system information files, are relocated to a directory tree starting in the specified \fIroot_path\fR. The \fIroot_path\fR may be specified when installing to a client from a server (for example, \fB/export/root/client1\fR). .LP Note - .sp .RS 2 The root file system of any non-global zones must not be referenced with the \fB-R\fR option. Doing so might damage the global zone's file system, might compromise the security of the global zone, and might damage the non-global zone's file system. See \fBzones\fR(7). .RE .RE .sp .ne 2 .na \fB\fB-v\fR\fR .ad .sp .6 .RS 4n Verbose mode. Files are listed as processed. .RE .sp .ne 2 .na \fB\fB-V\fR \fIfs_file\fR\fR .ad .sp .6 .RS 4n Specify an alternative \fIfs_file\fR to map the client's file systems. For example, used in situations where the \fB$\fR\fIroot_path\fR\fB/etc/vfstab\fR file is non-existent or unreliable. .RE .sp .ne 2 .na \fB\fB-x\fR\fR .ad .sp .6 .RS 4n Search exclusive directories, looking for files which exist that are not in the installation software database or the indicated \fBpkgmap\fR file. .RE .sp .ne 2 .na \fB\fB-Y\fR \fIcategory\fR\fR .ad .sp .6 .RS 4n Check packages based on the value of the \fBCATEGORY\fR parameter stored in the installed or spooled package's \fBpkginfo\fR(5) file. .RE .SH OPERANDS .sp .ne 2 .na \fB\fIpkginst\fR\fR .ad .sp .6 .RS 4n The package instance or instances to be checked. The format \fIpkginst\fR\fB\&.*\fR can be used to check all instances of a package. The default is to display all information about all installed packages. .sp The asterisk character (\fB*\fR) is a special character to some shells and may need to be escaped. In the C-Shell, an asterisk must be surrounded by single quotes (\fB\&'\fR) or preceded by a backslash (\e); .RE .sp .ne 2 .na \fB\fIpartial-path\fR\fR .ad .sp .6 .RS 4n A portion of a path, such as a file or directory name. .RE .SH EXAMPLES .LP \fBExample 1 \fRUsing \fBpkgchk\fR for Displaying Package Installation Information .sp .LP The following example displays package installation information for \fB/usr/bin/ls\fR: .sp .in +2 .nf example% \fBpkgchk -l -p /usr/bin/ls\fR .fi .in -2 .sp .LP \fBExample 2 \fRChecking on Java Font Properties .sp .LP The following example displays package installation information for all Java font properties installed on the system. .sp .in +2 .nf example% \fBpkgchk -l -P font.properties\fR .fi .in -2 .sp .LP \fBExample 3 \fRSpecifying a Path That Contains a Comma .sp .LP Assume you want to specify the path: .sp .in +2 .nf /platform/SUNW,Netra-T12/lib .fi .in -2 .sp .sp .LP List this path in a file. Here is one way in which you can do that: .sp .in +2 .nf example% \fBecho "/platform/SUNW,Netra-T12/lib" > /tmp/p\fR .fi .in -2 .sp .sp .LP You can then enter: .sp .in +2 .nf example% \fBpkgchk -i /tmp/p -l\fR Pathname: /platform/SUNW,Netra-T12/lib Type: directory Expected mode: 0755 Expected owner: root Expected group: bin Referenced by the following packages: SUNWcar Current status: installed .fi .in -2 .sp .SH EXIT STATUS .sp .ne 2 .na \fB\fB0\fR\fR .ad .sp .6 .RS 4n Successful completion. .RE .sp .ne 2 .na \fB\fB>0\fR\fR .ad .sp .6 .RS 4n An error occurred. .RE .SH SEE ALSO .sp .LP .BR pkginfo (1), .BR pkgtrans (1), .BR pkginfo (5), .BR attributes (7), .BR largefile (7), .BR pkgadd (8), .BR pkgask (8), .BR pkgrm (8) .sp .LP \fI\fR .SH NOTES .sp .LP Package commands are \fBlargefile\fR(7)-aware. They handle files larger than 2 GB in the same way they handle smaller files. In their current implementations, \fBpkgadd\fR(8), \fBpkgtrans\fR(1) and other package commands can process a datastream of up to 4 GB.