Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../../../../.././../usr/man/man8/pkgcond.8
Real path: /usr/share/man/man8/pkgcond.8
Zurück
'\" te .\" Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved. .TH pkgcond 8 "13 Aug 2014" "Oracle Solaris 11.4" "System Administration Commands" .SH NAME pkgcond \- determine type and capability of target .SH SYNOPSIS .LP .nf \fB/usr/bin/pkgcond\fR [\fB-nv\fR] \fIcondition\fR .fi .SH DESCRIPTION .sp .LP The \fBpkgcond\fR command allows you to determine the type of target being operated on (global zone, non-global zone, diskless client, and so forth) and the capabilities available for that type of client (can add a driver, path is writable, and so forth). The \fBpkgcond\fR command is intended to be invoked from package and patch scripts, but can also be used in situations that mimic the context of these scripts. See \fBNOTES\fR for further guidance. .sp .LP \fBpkgcond\fR has one mandatory argument, a condition. The command tests whether the condition is true for the specified path. The condition can be one of the following: .RS +4 .TP .ie t \(bu .el o \fBcan_add_driver\fR [\fIpath\fR] .RE .RS +4 .TP .ie t \(bu .el o \fBcan_remove_driver\fR [\fIpath\fR] .RE .RS +4 .TP .ie t \(bu .el o \fBcan_update_driver\fR [\fIpath\fR] .RE .RS +4 .TP .ie t \(bu .el o \fBis_alternative_root\fR [\fIpath\fR] .RE .RS +4 .TP .ie t \(bu .el o \fBis_boot_environment\fR [\fIpath\fR] .RE .RS +4 .TP .ie t \(bu .el o \fBis_diskless_client\fR [\fIpath\fR] .RE .RS +4 .TP .ie t \(bu .el o \fBis_global_zone\fR [\fIpath\fR] .RE .RS +4 .TP .ie t \(bu .el o \fBis_mounted_miniroot\fR [\fIpath\fR] .RE .RS +4 .TP .ie t \(bu .el o \fBis_netinstall_image\fR [\fIpath\fR] .RE .RS +4 .TP .ie t \(bu .el o \fBis_nonglobal_zone\fR [\fIpath\fR] .RE .RS +4 .TP .ie t \(bu .el o \fBis_path_writable\fR \fIpath\fR .RE .RS +4 .TP .ie t \(bu .el o \fBis_running_system\fR [\fIpath\fR] .RE .RS +4 .TP .ie t \(bu .el o \fBis_sparse_root_nonglobal_zone\fR [\fIpath\fR] .RE .RS +4 .TP .ie t \(bu .el o \fBis_what\fR [\fIpath\fR] .RE .RS +4 .TP .ie t \(bu .el o \fBis_whole_root_nonglobal_zone\fR [\fIpath\fR] .RE .sp .LP The \fIpath\fR argument usually denotes the root of the global zone or non-global zone, or alternate root. If path is optional and not specified, the default is \fB/\fR. .sp .LP The behavior of the \fBis_what\fR condition is somewhat special, because it displays results of all other conditions to standard output. .SH OPTIONS .sp .LP The following options are supported: .sp .ne 2 .mk .na \fB\fB-n\fR\fR .ad .br .sp .6 .RS 4n Negate return status (\fB0\fR becomes \fB1\fR and \fB1\fR becomes \fB0\fR). It negates results in the case of \fBis_what\fR condition. .RE .sp .ne 2 .mk .na \fB\fB-v\fR\fR .ad .br .sp .6 .RS 4n Verbose mode. Displays detailed data about intermediate checks performed. .RE .SH EXAMPLES .LP \fBExample 1\fR Listing All Available Information .sp .LP The following command lists all available information about the current running system, in a user-friendly way. .sp .in +2 .nf example# \fBpkgcond -n is_what\fR .fi .in -2 .sp .LP \fBExample 2\fR Determining if Target is an Alternate Root .sp .LP The following command determines whether an alternate boot environment exists under \fB/altroot_mount\fR. .sp .in +2 .nf example# \fBpkgcond is_alternative_root /altroot_mount\fR .fi .in -2 .sp .SH EXIT STATUS .sp .ne 2 .mk .na \fB\fB0\fR\fR .ad .br .sp .6 .RS 4n Condition is true unless \fB-n\fR was specified. .RE .sp .ne 2 .mk .na \fB\fB1\fR\fR .ad .br .sp .6 .RS 4n Condition is false unless \fB-n\fR was specified. .RE .sp .ne 2 .mk .na \fB\fB2\fR\fR .ad .br .sp .6 .RS 4n Command line usage error. .RE .sp .ne 2 .mk .na \fB\fB3\fR\fR .ad .br .sp .6 .RS 4n Command failed to perform the test due to a fatal error. .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(7) for descriptions of the following attributes: .sp .TS tab( ) box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPE ATTRIBUTE VALUE _ Availability package/svr4 _ Interface Stability Uncommitted .TE .sp .SH SEE ALSO .sp .LP \fBpkgtrans\fR(1), \fBpkginfo\fR(5), \fBattributes\fR(7), \fBpkgadd\fR(8), \fBpkgask\fR(8), \fBpkgchk\fR(8), \fBpkgrm\fR(8) .SH NOTES .sp .LP Supported usage of \fBpkgcond\fR is subject to the following constraints: .RS +4 .TP 1. Do not use \fBpkgcond\fR outside of the Solaris marketing release in which it is provided (for example, do not use Solaris 10 \fBpkgcond\fR against a Solaris 9 target). .RE .RS +4 .TP 2. Restrict use of the optional path argument according to the following rules: .RS +4 .TP .ie t \(bu .el o The command \fBpkgcond\fR \fIcondition\fR \fB$ROOTDIR\fR can be used in patch level scripts. .RE .RS +4 .TP .ie t \(bu .el o The command \fBpkgcond\fR \fIcondition\fR \fB$PKG_INSTALL_ROOT\fR can be used in package level scripts. .RE .RS +4 .TP .ie t \(bu .el o A command of the form \fBpkgcond\fR \fIcondition\fR \fBwithout\fR the optional path argument can be used in any context. .RE .RE .sp .LP Use of \fBpkgcond\fR with an arbitrary path argument is \fBnot\fR recommended or supported, as the results returned might not be accurate.