1pkgchk(1M) System Administration Commands pkgchk(1M)
2
3
4
6 pkgchk - check package installation accuracy
7
9 pkgchk [-l | -acfnqvx] [-i file | -]
10 [-p path... | -P partial-path...] [-R root_path]
11 [ [-m pkgmap [-e envfile]] | pkginst... | -Y category,category...]
12
13
14 pkgchk -d device [-l | -fv] [-i file | -] [-M] [-p path]...
15 [-V fs_file]
16 [pkginst... | -Y category[,category...]]
17
18
20 pkgchk checks the accuracy of installed files or, by using the -l
21 option, displays information about package files. pkgchk checks the
22 integrity of directory structures and files. Discrepancies are written
23 to standard error along with a detailed explanation of the problem.
24
25
26 The first synopsis defined above is used to list or check the contents
27 and/or attributes of objects that are currently installed on the sys‐
28 tem, or in the indicated pkgmap. Package names may be listed on the
29 command line, or by default, the entire contents of a machine will be
30 checked.
31
32
33 The second synopsis is used to list or check the contents of a package
34 which has been spooled on the specified device, but not installed. Note
35 that attributes cannot be checked for spooled packages.
36
38 The following options are supported:
39
40 -a
41
42 Audit the file attributes only and do not check file contents.
43 Default is to check both.
44
45
46 -c
47
48 Audit the file contents only and do not check file attributes.
49 Default is to check both.
50
51
52 -d device
53
54 Specify the device on which a spooled package resides. device can
55 be a directory path name or the identifiers for tape, floppy disk,
56 or removable disk (for example, /var/tmp or /dev/diskette).
57
58
59 -e envfile
60
61 Request that the package information file named as envfile be used
62 to resolve parameters noted in the specified pkgmap file.
63
64
65 -f
66
67 Correct file attributes if possible. If used with the -x option,
68 this option removes hidden files. When pkgchk is invoked with this
69 option, it creates directories, named pipes, links, and special
70 devices if they do not already exist. If the -d option calls out an
71 uninstalled package, the -f option will only take effect if the
72 package is in directory (not stream) format. All file attributes
73 will be set to agree with the entries in the pkgmap file except
74 that setuid, setgid, and sticky bits will not be set in the mode.
75
76
77 -i file | -
78
79 Read a list of path names from file or from stdin (-) and compare
80 this list against the installation software database or the indi‐
81 cated pkgmap file. Path names that are not contained in file or
82 stdin are not checked.
83
84
85 -l
86
87 List information on the selected files that make up a package. This
88 option is not compatible with the -a, -c, -f, -g, and -v options.
89
90
91 -m pkgmap
92
93 Check the package against the package map file, pkgmap.
94
95
96 -M
97
98 Instruct pkgchk not to use the $root_path/etc/vfstab file for
99 determining the client's mount points. This option assumes the
100 mount points are correct on the server and it behaves consistently
101 with Solaris 2.5 and earlier releases.
102
103
104 -n
105
106 Do not check volatile or editable files' contents. This should be
107 used for most post-installation checking.
108
109
110 -p path
111
112 Check the accuracy only of the path name or path names listed. path
113 can be one or more path names separated by commas (or by white‐
114 space, if the list is quoted).
115
116 To specify a path that includes a comma, you must use the -i
117 option, described above. See EXAMPLES.
118
119
120 -P partial-path
121
122 Check the accuracy of only the partial path name or path names
123 listed. partial-path can be one or more partial path names sepa‐
124 rated by commas (or by whitespace, if the list is quoted). This
125 option can be used instead of -p and is not compatible with the
126 other option. This option matches any path name that contains the
127 string contained in the partial path. See the note about paths that
128 contain commas in the description of -p.
129
130
131 -q
132
133 Quiet mode. Do not give messages about missing files.
134
135
136 -R root_path
137
138 Define the full name of a directory to use as the root_path. All
139 files, including package system information files, are relocated to
140 a directory tree starting in the specified root_path. The root_path
141 may be specified when installing to a client from a server (for
142 example, /export/root/client1).
143
144 Note -
145
146 The root file system of any non-global zones must not be refer‐
147 enced with the -R option. Doing so might damage the global zone's
148 file system, might compromise the security of the global zone,
149 and might damage the non-global zone's file system. See zones(5).
150
151
152 -v
153
154 Verbose mode. Files are listed as processed.
155
156
157 -V fs_file
158
159 Specify an alternative fs_file to map the client's file systems.
160 For example, used in situations where the $root_path/etc/vfstab
161 file is non-existent or unreliable.
162
163
164 -x
165
166 Search exclusive directories, looking for files which exist that
167 are not in the installation software database or the indicated
168 pkgmap file.
169
170
171 -Y category
172
173 Check packages based on the value of the CATEGORY parameter stored
174 in the installed or spooled package's pkginfo(4) file.
175
176
178 pkginst
179
180 The package instance or instances to be checked. The format
181 pkginst.* can be used to check all instances of a package. The
182 default is to display all information about all installed packages.
183
184 The asterisk character (*) is a special character to some shells
185 and may need to be escaped. In the C-Shell, an asterisk must be
186 surrounded by single quotes (') or preceded by a backslash (\);
187
188
189 partial-path
190
191 A portion of a path, such as a file or directory name.
192
193
195 Example 1 Using pkgchk for Displaying Package Installation Information
196
197
198 The following example displays package installation information for
199 /usr/bin/ls:
200
201
202 example% pkgchk -l -p /usr/bin/ls
203
204
205
206 Example 2 Checking on Java Font Properties
207
208
209 The following example displays package installation information for all
210 Java font properties installed on the system.
211
212
213 example% pkgchk -l -P font.properties
214
215
216
217 Example 3 Specifying a Path That Contains a Comma
218
219
220 Assume you want to specify the path:
221
222
223 /platform/SUNW,Netra-T12/lib
224
225
226
227
228 List this path in a file. Here is one way in which you can do that:
229
230
231 example% echo "/platform/SUNW,Netra-T12/lib" > /tmp/p
232
233
234
235
236 You can then enter:
237
238
239 example% pkgchk -i /tmp/p -l
240 Pathname: /platform/SUNW,Netra-T12/lib
241 Type: directory
242 Expected mode: 0755
243 Expected owner: root
244 Expected group: bin
245 Referenced by the following packages:
246 SUNWcar
247 Current status: installed
248
249
250
252 0
253
254 Successful completion.
255
256
257 >0
258
259 An error occurred.
260
261
263 See attributes(5) for descriptions of the following attributes:
264
265
266
267
268 ┌─────────────────────────────┬─────────────────────────────┐
269 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
270 ├─────────────────────────────┼─────────────────────────────┤
271 │Availability │SUNWcsu │
272 └─────────────────────────────┴─────────────────────────────┘
273
275 pkginfo(1), pkgtrans(1), pkgadd(1M), pkgask(1M), pkgrm(1M), pkginfo(4),
276 attributes(5), largefile(5)
277
278
279
280
282 Package commands are largefile(5)-aware. They handle files larger than
283 2 GB in the same way they handle smaller files. In their current imple‐
284 mentations, pkgadd(1M), pkgtrans(1) and other package commands can
285 process a datastream of up to 4 GB.
286
287
288
289SunOS 5.11 30 Oct 2007 pkgchk(1M)