293 useradd/del/mod should be ZFS-aware
[illumos-gate.git] / usr / src / man / man1m / pkgchk.1m
blobeb0600dc28deb8dba871b0b781391539513c59be
1 '\" te
2 .\"  Copyright 1989 AT&T Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
3 .\" 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.
4 .\" 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.
5 .\" 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]
6 .TH PKGCHK 1M "Oct 30, 2007"
7 .SH NAME
8 pkgchk \- check package installation accuracy
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fBpkgchk\fR [\fB-l\fR | \fB-acfnqvx\fR] [\fB-i\fR \fIfile\fR | -]
13      [\fB-p\fR \fIpath\fR... | \fB-P\fR \fIpartial-path\fR...] [\fB-R\fR \fIroot_path\fR]
14      [ [\fB-m\fR \fIpkgmap\fR [\fB-e\fR \fIenvfile\fR]] | pkginst... | \fB-Y\fR \fIcategory\fR,\fIcategory\fR\&.\|.\|.]
15 .fi
17 .LP
18 .nf
19 \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]...
20      [\fB-V\fR \fIfs_file\fR]
21      [pkginst... | \fB-Y\fR \fIcategory\fR[,\fIcategory\fR\&.\|.\|.]]
22 .fi
24 .SH DESCRIPTION
25 .sp
26 .LP
27 \fBpkgchk\fR checks the accuracy of installed files or, by using the \fB-l\fR
28 option, displays information about package files. \fBpkgchk\fR checks the
29 integrity of directory structures and files. Discrepancies are written to
30 standard error along with a detailed explanation of the problem.
31 .sp
32 .LP
33 The first synopsis defined above is used to list or check the contents and/or
34 attributes of objects that are currently installed on the system, or in the
35 indicated \fBpkgmap\fR. Package names may be listed on the command line, or by
36 default, the entire contents of a machine will be checked.
37 .sp
38 .LP
39 The second synopsis is used to list or check the contents of a package which
40 has been spooled on the specified device, but not installed. Note that
41 attributes cannot be checked for spooled packages.
42 .SH OPTIONS
43 .sp
44 .LP
45 The following options are supported:
46 .sp
47 .ne 2
48 .na
49 \fB\fB-a\fR\fR
50 .ad
51 .sp .6
52 .RS 4n
53 Audit the file attributes only and do not check file contents. Default is to
54 check both.
55 .RE
57 .sp
58 .ne 2
59 .na
60 \fB\fB-c\fR\fR
61 .ad
62 .sp .6
63 .RS 4n
64 Audit the file contents only and do not check file attributes. Default is to
65 check both.
66 .RE
68 .sp
69 .ne 2
70 .na
71 \fB\fB\fR\fB-d\fR \fIdevice\fR\fR
72 .ad
73 .sp .6
74 .RS 4n
75 Specify the device on which a spooled package resides. \fIdevice\fR can be a
76 directory path name or the identifiers for tape, floppy disk, or removable disk
77 (for example, \fB/var/tmp\fR or \fB/dev/diskette\fR).
78 .RE
80 .sp
81 .ne 2
82 .na
83 \fB\fB\fR\fB-e\fR \fIenvfile\fR\fR
84 .ad
85 .sp .6
86 .RS 4n
87 Request that the package information file named as \fIenvfile\fR be used to
88 resolve parameters noted in the specified \fBpkgmap\fR file.
89 .RE
91 .sp
92 .ne 2
93 .na
94 \fB\fB-f\fR\fR
95 .ad
96 .sp .6
97 .RS 4n
98 Correct file attributes if possible. If used with the \fB-x\fR option, this
99 option removes hidden files. When \fBpkgchk\fR is invoked with this option, it
100 creates directories, named pipes, links, and special devices if they do not
101 already exist. If the \fB-d\fR option calls out an uninstalled package, the
102 \fB-f\fR option will only take effect if the package is in directory (not
103 stream) format. All file attributes will be set to agree with the entries in
104 the \fBpkgmap\fR file except that setuid, setgid, and sticky bits will not be
105 set in the mode.
109 .ne 2
111 \fB\fB\fR\fB-i\fR \fIfile\fR | \fB-\fR\fR
113 .sp .6
114 .RS 4n
115 Read a list of path names from \fIfile\fR or from stdin (\fB-\fR) and compare
116 this list against the installation software database or the indicated
117 \fBpkgmap\fR file. Path names that are not contained in \fIfile\fR or stdin are
118 not checked.
122 .ne 2
124 \fB\fB-l\fR\fR
126 .sp .6
127 .RS 4n
128 List information on the selected files that make up a package. This option is
129 not compatible with the \fB-a\fR, \fB-c\fR, \fB-f\fR, \fB-g\fR, and \fB-v\fR
130 options.
134 .ne 2
136 \fB\fB-m\fR \fBpkgmap\fR\fR
138 .sp .6
139 .RS 4n
140 Check the package against the package map file, \fBpkgmap\fR.
144 .ne 2
146 \fB\fB-M\fR\fR
148 .sp .6
149 .RS 4n
150 Instruct \fBpkgchk\fR not to use the \fB$\fR\fIroot_path\fR\fB/etc/vfstab\fR
151 file for determining the client's mount points. This option assumes the mount
152 points are correct on the server and it behaves consistently with Solaris 2.5
153 and earlier releases.
157 .ne 2
159 \fB\fB-n\fR\fR
161 .sp .6
162 .RS 4n
163 Do not check volatile or editable files' contents. This should be used for most
164 post-installation checking.
168 .ne 2
170 \fB\fB\fR\fB-p\fR \fIpath\fR\fR
172 .sp .6
173 .RS 4n
174 Check the accuracy only of the path name or path names listed. \fIpath\fR can
175 be one or more path names separated by commas (or by whitespace, if the list is
176 quoted).
178 To specify a \fIpath\fR that includes a comma, you must use the \fB-i\fR
179 option, described above. See EXAMPLES.
183 .ne 2
185 \fB\fB\fR\fB-P\fR \fIpartial-path\fR\fR
187 .sp .6
188 .RS 4n
189 Check the accuracy of only the partial path name or path names listed.
190 \fIpartial-path\fR can be one or more partial path names separated by commas
191 (or by whitespace, if the list is quoted). This option can be used instead of
192 \fB-p\fR and is not compatible with the other option. This option matches any
193 path name that contains the string contained in the partial path. See the note
194 about paths that contain commas in the description of \fB-p\fR.
198 .ne 2
200 \fB\fB-q\fR\fR
202 .sp .6
203 .RS 4n
204 Quiet mode. Do not give messages about missing files.
208 .ne 2
210 \fB\fB-R\fR \fIroot_path\fR\fR
212 .sp .6
213 .RS 4n
214 Define the full name of a directory to use as the \fIroot_path\fR. All files,
215 including package system information files, are relocated to a directory tree
216 starting in the specified \fIroot_path\fR. The \fIroot_path\fR may be specified
217 when installing to a client from a server (for example,
218 \fB/export/root/client1\fR).
220 Note -
222 .RS 2
223 The root file system of any non-global zones must not be referenced with the
224 \fB-R\fR option. Doing so might damage the global zone's file system, might
225 compromise the security of the global zone, and might damage the non-global
226 zone's file system. See \fBzones\fR(5).
231 .ne 2
233 \fB\fB-v\fR\fR
235 .sp .6
236 .RS 4n
237 Verbose mode. Files are listed as processed.
241 .ne 2
243 \fB\fB-V\fR \fIfs_file\fR\fR
245 .sp .6
246 .RS 4n
247 Specify an alternative \fIfs_file\fR to map the client's file systems. For
248 example, used in situations where the \fB$\fR\fIroot_path\fR\fB/etc/vfstab\fR
249 file is non-existent or unreliable.
253 .ne 2
255 \fB\fB-x\fR\fR
257 .sp .6
258 .RS 4n
259 Search exclusive directories, looking for files which exist that are not in the
260 installation software database or the indicated \fBpkgmap\fR file.
264 .ne 2
266 \fB\fB-Y\fR \fIcategory\fR\fR
268 .sp .6
269 .RS 4n
270 Check packages based on the value of the \fBCATEGORY\fR parameter stored in the
271 installed or spooled package's \fBpkginfo\fR(4) file.
274 .SH OPERANDS
276 .ne 2
278 \fB\fIpkginst\fR\fR
280 .sp .6
281 .RS 4n
282 The package instance or instances to be checked. The format
283 \fIpkginst\fR\fB\&.*\fR can be used to check all instances of a package. The
284 default is to display all information about all installed packages.
286 The asterisk character (\fB*\fR) is a special character to some shells and may
287 need to be escaped. In the C-Shell, an asterisk must be surrounded by single
288 quotes (\fB\&'\fR) or preceded by a backslash (\e);
292 .ne 2
294 \fB\fIpartial-path\fR\fR
296 .sp .6
297 .RS 4n
298 A portion of a path, such as a file or directory name.
301 .SH EXAMPLES
303 \fBExample 1 \fRUsing \fBpkgchk\fR for Displaying Package Installation
304 Information
307 The following example displays package installation information for
308 \fB/usr/bin/ls\fR:
311 .in +2
313 example% \fBpkgchk -l -p /usr/bin/ls\fR
315 .in -2
319 \fBExample 2 \fRChecking on Java Font Properties
322 The following example displays package installation information for all Java
323 font properties installed on the system.
326 .in +2
328 example% \fBpkgchk -l -P font.properties\fR
330 .in -2
334 \fBExample 3 \fRSpecifying a Path That Contains a Comma
337 Assume you want to specify the path:
340 .in +2
342 /platform/SUNW,Netra-T12/lib
344 .in -2
349 List this path in a file. Here is one way in which you can do that:
352 .in +2
354 example% \fBecho "/platform/SUNW,Netra-T12/lib" > /tmp/p\fR
356 .in -2
361 You can then enter:
364 .in +2
366 example% \fBpkgchk -i /tmp/p -l\fR
367 Pathname: /platform/SUNW,Netra-T12/lib
368 Type: directory
369 Expected mode: 0755
370 Expected owner: root
371 Expected group: bin
372 Referenced by the following packages:
373         SUNWcar
374 Current status: installed
376 .in -2
379 .SH EXIT STATUS
381 .ne 2
383 \fB\fB0\fR\fR
385 .sp .6
386 .RS 4n
387 Successful completion.
391 .ne 2
393 \fB\fB>0\fR\fR
395 .sp .6
396 .RS 4n
397 An error occurred.
400 .SH SEE ALSO
403 \fBpkginfo\fR(1), \fBpkgtrans\fR(1), \fBpkgadd\fR(1M), \fBpkgask\fR(1M),
404 \fBpkgrm\fR(1M), \fBpkginfo\fR(4), \fBattributes\fR(5), \fBlargefile\fR(5)
407 \fI\fR
408 .SH NOTES
411 Package commands are \fBlargefile\fR(5)-aware. They handle files larger than 2
412 GB in the same way they handle smaller files. In their current implementations,
413 \fBpkgadd\fR(1M), \fBpkgtrans\fR(1) and other package commands can process a
414 datastream of  up to 4 GB.