.\" .\" CDDL HEADER START .\" .\" 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] .\" .\" CDDL HEADER END .\" Copyright 1989 AT&T Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved .\" Portions Copyright (c) 2007 Gunnar Ritter, Freiburg i. Br., Germany .\" .\" Sccsid @(#)pkgchk.1m 1.8 (gritter) 2/25/07 .\" .\" from OpenSolaris pkgchk 1M "18 May 2006" "SunOS 5.11" "System Administration Commands" .TH PKGCHK 1M "2/25/07" "Heirloom Packaging Tools" "System Administration Commands" .SH NAME pkgchk \- check package installation accuracy .SH SYNOPSIS .HP .PD 0 .ad l .nh \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\&.\|.\|.] .HP .PD 0 .ad l \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\&.\|.\|.]] .br .PD .ad b .hy 1 .SH DESCRIPTION \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. .PP 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. .PP 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. .PP The following options and operands are supported: .TP .B \-a Audit the file attributes only and do not check file contents. Default is to check both. .TP .B \-c Audit the file contents only and do not check file attributes. Default is to check both. .TP \fB\-d\fR \fIdevice\fR 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). .TP \fB\-e\fR \fIenvfile\fR Request that the package information file named as \fIenvfile\fR be used to resolve parameters noted in the specified \fBpkgmap\fR file. .TP .B \-f 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. .TP \fB\-i\fR \fIfile\fR | \fB\-\fR 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. .TP .B \-l 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. .TP \fB\-m\fR \fBpkgmap\fR Check the package against the package map file, \fBpkgmap\fR. .ig .TP .B \-M 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. .. .TP .B \-n Do not check volatile or editable files' contents. This should be used for most post-installation checking. .TP \fB\-p\fR \fIpath\fR 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). .IP To specify a \fIpath\fR that includes a comma, you must use the \fB\-i\fR option, described above. See EXAMPLES. .TP \fB\-P\fR \fIpartial-path\fR 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. .TP .B \-q Quiet mode. Do not give messages about missing files. .TP \fB\-R\fR \fIroot_path\fR 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). .ig .IP Note: 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 .IR zones (5). .. .TP .B \-v Verbose mode. Files are listed as processed. .ig .TP \fB\-V\fR \fIfs_file\fR 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. .. .TP .B \-x Search exclusive directories, looking for files which exist that are not in the installation software database or the indicated \fBpkgmap\fR file. .TP \fB\-Y\fR \fIcategory\fR Check packages based on the value of the \fBCATEGORY\fR parameter stored in the installed or spooled package's .IR pkginfo (5) file. .TP \fB\fIpkginst\fR 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. .IP 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); .TP \fB\fIpartial-path\fR A portion of a path, such as a file or directory name. .SH EXAMPLES \fBExample 1 \fRUsing \fBpkgchk\fR for Displaying Package Installation Information .LP The following example displays package installation information for \fB/usr/bin/ls\fR: .PP .RS .nf \fBpkgchk \-l \-p /usr/bin/ls\fR .fi .RE .PP \fBExample 2 \fRChecking on Java Font Properties .LP The following example displays package installation information for all Java font properties installed on the system. .PP .RS .nf \fBpkgchk \-l \-P font.properties\fR .fi .RE .PP \fBExample 3 \fRSpecifying a Path That Contains a Comma .LP Assume you want to specify the path: .PP .RS .nf /platform/SUNW,Netra-T12/lib .fi .RE .PP List this path in a file. Here is one way in which you can do that: .PP .RS .nf \fBecho "/platform/SUNW,Netra-T12/lib" > /tmp/p\fR .fi .RE .PP You can then enter: .PP .RS .nf \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 .RE .SH SEE ALSO .IR pkginfo (1), .IR pkgtrans (1), .IR pkgadd (1M), .IR pkgask (1M), .IR pkgrm (1M), .IR pkginfo (5)