You use the pkgchk command to check installation completeness, path name, file contents, and file attributes of a package. See pkgchk(1M) for more information on all the options.
Use the pkginfo command to display information about the packages that are installed on the system.
List information about installed packages with the pkginfo command.
$ pkginfo |
The following example shows the pkginfo command to list all packages installed on a local system, whether that system is a standalone or server. The output shows the primary category, package name, and a description of the package.
$ pkginfo system SUNWaccr System Accounting, (Root) system SUNWaccu System Accounting, (Usr) system SUNWadmap System administration applications system SUNWadmc System administration core libraries . . . |
Log in to a system as superuser.
Check the status of an installed package with the pkgchk command.
# pkgchk [ -a -c -v ] pkgid ... # pkgchk -dspooldir pkgid ... |
-a |
Specifies to audit only the file attributes (that is, the permissions), rather than the file attributes and contents, which is the default for pkgchk. |
-c |
Specifies to audit only the file contents, rather than the file contents and attributes, which is the default for pkgchk. |
-v |
Specifies verbose mode, which displays file names as pkgchk processes them. |
-d spooldir |
Specifies the absolute path of the spool directory. |
pkgid |
(Optional) Is the name of one or more packages (separated by spaces). If you do not specify a pkgid, pkgchk checks all the software packages installed on the system. If omitted, pkgchk displays all available packages. |
The following example shows how to check the contents of a package.
# pkgchk -c SUNWadmfw |
If pkgchk determines there are no errors, it returns the system prompt. Otherwise, it reports the error.
The following example shows how to check the file attributes of a package.
# pkgchk -a SUNWadmfw |
If pkgchk determines there are no errors, it returns the system prompt. Otherwise, it reports the error.
The following example shows how to check a software package copied to a spool directory (/export/install/packages).
# pkgchk -d /export/install/packages ## checking spooled package <SUNWadmap> ## checking spooled package <SUNWadmfw> ## checking spooled package <SUNWadmc> ## checking spooled package <SUNWsadml> |
The checks made on a spooled package are limited because not all information can be audited until a package is installed.
List information about installed packages with the pkginfo -l command.
$ pkginfo -l pkgid ... |
-l |
Specifies to display output in long format, which includes all available information about the package. |
pkgid |
(Optional) Is the name of one or more packages (separated by spaces). If omitted, pkginfo displays information about all available packages. |
$ pkginfo -l SUNWcar PKGINST: SUNWcar NAME: Core Architecture, (Root) CATEGORY: system ARCH: sparc.sun4u VERSION: 11.8.0,REV=1999.09.18.11.52 BASEDIR: / VENDOR: Sun Microsystems, Inc. DESC: core software for a specific hardware platform group PSTAMP: humbolt19990821191439 INSTDATE: Sep 18 1999 11:53 HOTLINE: Please contact your local service provider STATUS: completely installed FILES: 95 installed pathnames 31 shared pathnames 35 directories 49 executables 11307 blocks used (approx) |