xref: /titanic_50/usr/src/cmd/svr4pkg/pkgcond/pkgcond_msgs.h (revision 42e43e9829853ed82c9a4e268b0b15ea58be81fb)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 
22 /*
23  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef	_PKGCOND_MSGS_H
28 #define	_PKGCOND_MSGS_H
29 
30 
31 #include <libintl.h>
32 
33 #ifdef	__cplusplus
34 extern "C" {
35 #endif
36 
37 #ifdef	lint
38 #define	gettext(x)	x
39 #endif
40 
41 /* generic messages */
42 
43 #define	MSG_USAGE						gettext(\
44 "%s; usage is:\n" \
45 "\t%s [-nv] <condition> [ <option(s)> ]\n" \
46 "\n" \
47 "command options:\n" \
48 "\t-n - negate results of condition test\n" \
49 "\t-v - verbose output of condition testing\n" \
50 "\n" \
51 "<condition> may be any one of:\n" \
52 "%s\n" \
53 "<option(s)> are specific to the condition used\n" \
54 "\n" \
55 "pkgcond -?\n" \
56 "\t- Shows this help message\n")
57 
58 #define	MSG_NO_PKG_ENV_DATA_PRESENT				gettext(\
59 "no data available from package tools: zone information may be incomplete")
60 
61 #define	MSG_NO_ARGUMENTS_SPECIFIED				gettext(\
62 "no condition to check specified")
63 
64 #define	MSG_INVALID_OPTION_SPECIFIED				gettext(\
65 "option <%c> not recognized")
66 
67 #define	MSG_IS_INVALID_OPTION					gettext(\
68 "option <%c> not recognized by condition <%s>")
69 
70 #define	MSG_UNRECOGNIZED_CONDITION_SPECIFIED			gettext(\
71 "condition not recognized")
72 
73 #define	MSG_IS_WHAT_RESULT					gettext(\
74 "%s=%d")
75 
76 /* debugging messages */
77 
78 #define	DBG_NO_RECURSION					gettext(\
79 "nonrecursive call to <%s>")
80 
81 #define	DBG_RECURSION						gettext(\
82 "recursive call to <%s> count <%d> ignored")
83 
84 #define	DBG_TESTPATH_OK						gettext(\
85 "path <%s> matches all criteria")
86 
87 #define	DBG_ADDV_PATH_IS_SYMLINK				gettext(\
88 "cannot add driver to path <%s>: <%s> does not exist or exists but " \
89 "is a symbolic link")
90 
91 #define	DBG_ADDV_YES						gettext(\
92 "root path <%s> can have a driver added")
93 
94 #define	DBG_UPDV_PATH_IS_SYMLINK				gettext(\
95 "cannot update driver to path <%s>: <%s> does not exist or exists but " \
96 "is a symbolic link")
97 
98 #define	DBG_UPDV_YES						gettext(\
99 "root path <%s> can have a driver updated")
100 
101 #define	DBG_RMDV_PATH_IS_SYMLINK				gettext(\
102 "cannot remove driver to path <%s>: <%s> does not exist or exists but " \
103 "is a symbolic link")
104 
105 #define	DBG_RMDV_YES						gettext(\
106 "root path <%s> can have a driver removed")
107 
108 #define	DBG_ROOTPATH_IS						gettext(\
109 "root path is <%s>")
110 
111 #define	DBG_CANNOT_ACCESS_PATH_BUT_SHOULD			gettext(\
112 "test_path: path <%s> must exist and does not: %s")
113 
114 #define	DBG_CANNOT_ACCESS_PATH_OK				gettext(\
115 "test_path: path <%s> must not (and does not) exist")
116 
117 #define	DBG_PATH_DOES_NOT_EXIST					gettext(\
118 "test_path: path <%s> does not exist: %s")
119 
120 #define	DBG_CANNOT_LSTAT_PATH					gettext(\
121 "test_path: cannot lstat path <%s>: %s")
122 
123 #define	DBG_IS_A_DIRECTORY					gettext(\
124 "test_path: path <%s> is a directory but is not supposed to be")
125 
126 #define	DBG_IS_NOT_A_DIRECTORY					gettext(\
127 "test_path: path <%s> is not a directory but is supposed to be")
128 
129 #define	DBG_DIRECTORY_NOT					gettext(\
130 "test_path: path <%s> is not a directory")
131 
132 #define	DBG_DIRECTORY_IS					gettext(\
133 "test_path: path <%s> is a directory")
134 
135 #define	DBG_IS_A_FILE						gettext(\
136 "test_path: path <%s> is a file but is not supposed to be")
137 
138 #define	DBG_IS_NOT_A_FILE					gettext(\
139 "test_path: path <%s> is not a file but is supposed to be")
140 
141 #define	DBG_TOKEN__EXISTS					gettext(\
142 "test_path: token <%s> exists in path <%s>")
143 
144 #define	DBG_FILE_NOT						gettext(\
145 "test_path: path <%s> is not a file")
146 
147 #define	DBG_FILE_IS						gettext(\
148 "test_path: path <%s> is a file")
149 
150 #define	DBG_IS_A_SYMLINK					gettext(\
151 "test_path: path <%s> is a symlink but is not supposed to be")
152 
153 #define	DBG_IS_NOT_A_SYMLINK					gettext(\
154 "test_path: path <%s> is not a symlink but is supposed to be")
155 
156 #define	DBG_SORTEDINS_SKIPPED					gettext(\
157 "duplicate entry <%d> : <%s> (<%s> vs <%s>, <%s> vs <%s>): merged options")
158 
159 #define	DBG_SYMLINK_NOT						gettext(\
160 "test_path: path <%s> is not a symlink")
161 
162 #define	DBG_SYMLINK_IS						gettext(\
163 "test_path: path <%s> is a symlink")
164 
165 #define	DBG_SET_NEGATE_RESULTS					gettext(\
166 "set_negate_results: current setting <%d> new setting <%d>")
167 
168 #define	DBG_ADJUST_RESULTS					gettext(\
169 "adjust_results: result <%d> negate <%d> returned result <%d>")
170 
171 #define	DBG_PARSE_GLOBAL					gettext(\
172 "parsing global data <%s>")
173 
174 #define	DBG_NO_DEFAULT_ROOT_PATH_SET				gettext(\
175 "no default root path set")
176 
177 #define	DBG_DEFAULT_ROOT_PATH_SET				gettext(\
178 "default root path <%s> set from environment variable <%s>")
179 
180 #define	DBG_RESULTS						gettext(\
181 "returning results <%d>")
182 
183 #define	DBG_SET_ROOT_PATH_TO					gettext(\
184 "setting root path to <%s>")
185 
186 #define	DBG_TEST_PATH						gettext(\
187 "test path <%s> flags <0x%08lx>")
188 
189 #define	DBG_TEST_PATH_NO_RESOLVE				gettext(\
190 "cannot resolve path <%s>")
191 
192 #define	DBG_TEST_PATH_RESOLVE					gettext(\
193 "test resolved path <%s>")
194 
195 #define	DBG_TEST_EXISTS_SHOULD_NOT				gettext(\
196 "path <%s> exists but should not")
197 
198 #define	DBG_PARSED_ENVIRONMENT					gettext(\
199 "global data parsed from environment variable <%s>")
200 
201 #define	DBG_DUMP_GLOBAL_LINE					gettext(\
202 "inherited file system <%d> is <%s>")
203 
204 #define	DBG_DUMP_GLOBAL_ENTRY					gettext(\
205 "global data settings")
206 
207 #define	DBG_DUMP_GLOBAL_PARENT_ZONE				gettext(\
208 "parentzone zoneName <%s> zoneType <%s>")
209 
210 #define	DBG_DUMP_GLOBAL_CURRENT_ZONE				gettext(\
211 "currentzone zoneName <%s> zoneType <%s>")
212 
213 #define	DBG_IDLC_INITIAL_INSTALL				gettext(\
214 "path <%s> is not a diskless client: initial installation in progress")
215 
216 #define	DBG_IDLC_ZONE_INSTALL					gettext(\
217 "path <%s> is not a diskless client: initial zone installation in progress")
218 
219 #define	DBG_IDLC_PKG_NOT_INSTALLED				gettext(\
220 "path <%s> is not a diskless client: package <%s> is not installed in <%s>")
221 
222 #define	DBG_IDLC_ROOTPATH_BAD					gettext(\
223 "path <%s> is not a diskless client: root path cannot be <%s>")
224 
225 #define	DBG_IDLC_ZONE_BAD					gettext(\
226 "path <%s> is not a diskless client: current zone must be <%s>")
227 
228 #define	DBG_IDLC_PATH_MISSING					gettext(\
229 "path <%s> is not a diskless client: <%s> does not exist")
230 
231 #define	DBG_IDLC_USR_IS_NOT_EMPTY				gettext(\
232 "path <%s> is not a diskless client: </usr> is not empty")
233 
234 #define	DBG_IDLC_NO_TEMPLATES_PATH				gettext(\
235 "path <%s> is not a diskless client: <%s/%s> does not exist")
236 
237 #define	DBG_IDLC_PATH_IS_DISKLESS_CLIENT			gettext(\
238 "path <%s> is a diskless client")
239 
240 #define	DBG_ISGZ_INITIAL_INSTALL				gettext(\
241 "path <%s> is not a global zone: initial installation in progress")
242 
243 #define	DBG_ISGZ_NGZ_ZONE_INSTALL				gettext(\
244 "path <%s> is not a global zone: initial non-global zone " \
245 "installation in progress")
246 
247 #define	DBG_ISGZ_PATH_IS_GLOBAL_ZONE				gettext(\
248 "path <%s> is a global zone")
249 
250 #define	DBG_ISGZ_PATH_ISNT_DIRECTORY				gettext(\
251 "path <%s> is not a global zone: directory <%s> does not exist")
252 
253 #define	DBG_ISGZ_PATH_EXISTS					gettext(\
254 "path <%s> is not a global zone: <%s> exists")
255 
256 #define	DBG_ISGZ_ZONENAME_ISNT_GLOBAL				gettext(\
257 "path <%s> is not a global zone: zone name <%s> is not <global>")
258 
259 #define	DBG_ISGZ_PATH_IS_SYMLINK				gettext(\
260 "path <%s> is not a global zone: <%s> does not exist or exists but " \
261 "is a symbolic link")
262 
263 #define	DBG_INIM_INITIAL_INSTALL				gettext(\
264 "path <%s> is not a netinstall image: initial installation in progress")
265 
266 #define	DBG_INIM_ZONE_INSTALL					gettext(\
267 "path <%s> is not a netinstall image: initial zone installation in progress")
268 
269 #define	DBG_INIM_PATH_IS_NETINSTALL_IMAGE			gettext(\
270 "path <%s> is a netinstall image")
271 
272 #define	DBG_INIM_BAD_CURRENT_ZONE				gettext(\
273 "path <%s> is not a netinstall image: current zone is not <%s>")
274 
275 #define	DBG_INIM_PATH_ISNT_SYMLINK				gettext(\
276 "path <%s> is not a netinstall image: <%s> does not exist or exists " \
277 "but is not a symbolic link")
278 
279 #define	DBG_INIM_PATH_ISNT_DIRECTORY				gettext(\
280 "path <%s> is not a netinstall image: <%s> does not exist or " \
281 "is not a directory")
282 
283 #define	DBG_IMRT_INITIAL_INSTALL				gettext(\
284 "path <%s> is not a mounted miniroot image: initial installation in progress")
285 
286 #define	DBG_IMRT_ZONE_INSTALL					gettext(\
287 "path <%s> is not a mounted miniroot image: initial zone " \
288 "installation in progress")
289 
290 #define	DBG_IMRT_PATH_IS_MOUNTED_MINIROOT			gettext(\
291 "path <%s> is a mounted miniroot")
292 
293 #define	DBG_IMRT_BAD_CURRENT_ZONE				gettext(\
294 "path <%s> is not a mounted miniroot image: current zone is not <%s>")
295 
296 #define	DBG_IMRT_ROOTDIR_BAD					gettext(\
297 "path <%s> is not a mounted miniroot image: root directory is not <%s>")
298 
299 #define	DBG_IMRT_PATH_ISNT_SYMLINK				gettext(\
300 "path <%s> is not a mounted miniroot image: <%s> does not exist or is " \
301 " not a symbolic link")
302 
303 #define	DBG_IMRT_PATH_ISNT_DIRECTORY				gettext(\
304 "path <%s> is not a netinstall image: <%s> does not exist or is not " \
305 " a directory")
306 
307 #define	DBG_NGZN_INITIAL_INSTALL				gettext(\
308 "path <%s> is not a non-global zone: initial installation in progress")
309 
310 #define	DBG_NGZN_GLOBAL_ZONE_INSTALL				gettext(\
311 "path <%s> is not a non-global zone: initial global zone " \
312 "installation in progress")
313 
314 #define	DBG_NGZN_IN_GZ_IS_NONGLOBAL_ZONE			gettext(\
315 "path <%s> is a non-global zone: running in global zone")
316 
317 #define	DBG_NGZN_PARENT_CHILD_SAMEZONE				gettext(\
318 "path <%s> is a non-global zone: parent/child are same zone name <%s>")
319 
320 #define	DBG_NGZN_IS_NONGLOBAL_ZONE				gettext(\
321 "path <%s> is a non-global zone")
322 
323 #define	DBG_NGZN_ZONENAME_ISNT_NGZ				gettext(\
324 "path <%s> is not a non-global zone: zone name is <%s>")
325 
326 #define	DBG_NGZN_INSTALL_ZONENAME_IS_NGZ			gettext(\
327 "path <%s> is a non-global zone: installation of non-global zone name is <%s>")
328 
329 #define	DBG_NGZN_ZONENAME_IS_NGZ				gettext(\
330 "path <%s> is a non-global zone: zone name is <%s>")
331 
332 #define	DBG_NGZN_PATH_EXISTS					gettext(\
333 "path <%s> is not a non-global zone: <%s> exists")
334 
335 #define	DBG_NGZN_BAD_PARENT_ZONETYPE				gettext(\
336 "path <%s> is not a non-global zone: parent zone type is <%s>")
337 
338 #define	DBG_NGZN_BAD_CURRENT_ZONETYPE				gettext(\
339 "path <%s> is not a non-global zone: current zone type is <%s>")
340 
341 #define	DBG_NGZN_PATH_DOES_NOT_EXIST				gettext(\
342 "path <%s> is not a non-global zone: <%s> does not exist or exists but " \
343 "is a symbolic link")
344 
345 #define	DBG_IRST_INITIAL_INSTALL				gettext(\
346 "path <%s> is not the current running system: initial installation in progress")
347 
348 #define	DBG_IRST_ZONE_INSTALL					gettext(\
349 "path <%s> is not the current running system: initial zone installation " \
350 "in progress")
351 
352 #define	DBG_IRST_PATH_IS_RUNNING_SYSTEM				gettext(\
353 "path <%s> is a running system")
354 
355 #define	DBG_IRST_ZONE_BAD					gettext(\
356 "path <%s> is not the current running system: the current zone name " \
357 " is not <%s>")
358 
359 #define	DBG_IRST_ROOTPATH_BAD					gettext(\
360 "path <%s> is not the current running system: root path is not <%s>")
361 
362 #define	DBG_IALR_INITIAL_INSTALL				gettext(\
363 "path <%s> is an alternative root: initial installation in progress")
364 
365 #define	DBG_IALR_ZONE_INSTALL					gettext(\
366 "path <%s> is not an alternative root: initial zone installation in progress")
367 
368 #define	DBG_IALR_PATH_DOES_NOT_EXIST				gettext(\
369 "path <%s> is not an alternative root: <%s> does not exist or exists but " \
370 "is a symbolic link")
371 
372 #define	DBG_IALR_BAD_ROOTPATH					gettext(\
373 "path <%s> is not an alternative root: root directory is <%s>")
374 
375 #define	DBG_IALR_IS						gettext(\
376 "root path <%s> is an alternative root")
377 
378 #define	DBG_WRNG_IS						gettext(\
379 "root path <%s> is a whole root non-global zone")
380 
381 #define	DBG_WRNG_IS_NOT						gettext(\
382 "root path <%s> is not a whole root non-global zones: " \
383 "file systems are inherited")
384 
385 #define	DBG_SRNG_IS_NOT						gettext(\
386 "root path <%s> is not a sparse root non-global zones: " \
387 "file systems are not inherited")
388 
389 #define	DBG_SRNG_IS						gettext(\
390 "root path <%s> is a sparse root non-global zone")
391 
392 #define	DBG_BENV_INITIAL_INSTALL				gettext(\
393 "path <%s> is not an alternative boot environment: initial " \
394 "installation in progress")
395 
396 #define	DBG_BENV_ZONE_INSTALL					gettext(\
397 "path <%s> is not an alternative boot environment: initial zone " \
398 "installation in progress")
399 
400 #define	DBG_BENV_IS						gettext(\
401 "path <%s> is an alternative boot environment")
402 
403 #define	DBG_BENV_NO_ETCLU					gettext(\
404 "path <%s> is not an alternative boot environment: <%s> does " \
405 "not exist or is not a directory")
406 
407 #define	DBG_BENV_NO_ETCLUTAB					gettext(\
408 "path <%s> is not an alternative boot environment: <%s> does not exist")
409 
410 #define	DBG_BENV_BAD_ZONE					gettext(\
411 "path <%s> is not an alternative boot environment: " \
412 "the current zone name is not <%s>")
413 
414 #define	DBG_BENV_BAD_ROOTPATH					gettext(\
415 "path <%s> is not an alternative boot environment: root directory is <%s>")
416 
417 #define	DBG_PWRT_INHERITED					gettext(\
418 "root path <%s> is not writeable: is inherited with <%s>")
419 
420 #define	DBG_PWRT_READONLY					gettext(\
421 "root path <%s> is not writeable: is read only <%s>")
422 
423 #define	DBG_PWRT_IS						gettext(\
424 "root path <%s> is writeable")
425 
426 #define	DBG_PWRT_INFO						gettext(\
427 "root path <%s> is mount point <%s> fstype <%s> options <%s>")
428 
429 #define	DBG_NO_GLOBAL_DATA_AVAILABLE				gettext(\
430 "no global data available in environment variable <%s>")
431 
432 #define	DBG_CKSR_FSREADONLY					gettext(\
433 "file system <%s> type <%s> is read-only")
434 
435 #define	DBG_CALCSCFG_ENTRY					gettext(\
436 "analyzing inherited and mounted file systems")
437 
438 #define	DBG_CALCSCFG_INHERITED					gettext(\
439 "analyzing inherited file systems")
440 
441 #define	DBG_CALCSCFG_MOUNTED					gettext(\
442 "analyzing mounted file systems")
443 
444 #define	DBG_SINS_ENTRY						gettext(\
445 "inserting mount point <%s> type <%s> options <%s>")
446 
447 #define	DBG_NGZN_PATH_EXISTS					gettext(\
448 "path <%s> is not a non-global zone: <%s> exists")
449 
450 #define	DBG_CMDLINE_PATH					gettext(\
451 "command line path to check set to: <%s>")
452 
453 /* warnings */
454 
455 #define	WRN_PARSED_DATA_MISSING					gettext(\
456 "available global data missing <%s>")
457 
458 /* errors */
459 
460 #define	MSG_FATAL						gettext(\
461 	"Fatal Error")
462 
463 #define	ERR_REQUIRED_ROOTPATH_MISSING				gettext(\
464 "the <%s> condition requires a root path to be specified")
465 
466 #define	ERR_CANNOT_GET_ZONENAME					gettext(\
467 "could not determine zone name")
468 
469 #define	ERR_CANNOT_CALC_FS_CONFIG				gettext(\
470 "cannot calculate file system config")
471 
472 #define	ERR_CANNOT_PARSE_GLOBAL_DATA				gettext(\
473 "cannot parse global data SML: <%s>")
474 
475 #define	ERR_UNRECOGNIZED_OPTION					gettext(\
476 "unrecognized option <%s>")
477 
478 #define	ERR_DEFAULT_ROOT_INVALID				gettext(\
479 "cannot set root path to <%s>: %s")
480 
481 #define	ERR_DEFAULT_ROOT_NOT_DIR				gettext(\
482 "cannot set root path to <%s>: not a directory")
483 
484 #define	ERR_CANNOT_SET_ROOT_PATH				gettext(\
485 "cannot set root path from environment variable <%s>")
486 
487 #define	ERR_CANNOT_USE_GLOBAL_DATA				gettext(\
488 "global data from environment variable <%s> cannot be used to determine " \
489 "conditions and capabilities")
490 
491 #define	ERR_BAD_SUB						gettext(\
492 	"\"%s\" is not a valid condition")
493 
494 #ifdef	__cplusplus
495 }
496 #endif
497 
498 #endif /* _PKGCOND_MSGS_H */
499