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, server, diskless client, or AutoClient system. The output shows the primary category, package name, and a description of the package.
$ pkginfo system SUNWab2m Solaris Documentation Server Lookup system SUNWaccr System Accounting, (Root) system SUNWaccu System Accounting, (Usr) system SUNWadmap System administration applications system SUNWadmc System administration core libraries |
In a diskless or AutoClient system client/server setup, you may want to manage software from a central location. Since the server is the place to do this, you would need to use a variation of the pkginfo command. The following example shows the pkginfo -R command to list all packages installed on a diskless client named io. This command is executed from the diskless client's server.
server$ pkginfo -R /export/root/io system SUNWaccr System Accounting, (Root) system SUNWaccu System Accounting, (Usr) system SUNWadmap System & Network Administration Applications system SUNWadmfw System & Network Administration Framework . . . |
Log in to a system as superuser.
Check the status of an installed package with the pkgchk command.
# pkgchk -a | -c -v pkgid ... # pkgchk -d spooldir 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.sun4m VERSION: 11.6.0,REV=1998.05.06.20.36 BASEDIR: / VENDOR: Sun Microsystems, Inc. DESC: core software for a specific hardware platform group PSTAMP: on99819980507193137 INSTDATE: Jun 02 1998 11:43 HOTLINE: Please contact your local service provider STATUS: completely installed FILES: 48 installed pathnames 5 shared pathnames 7 directories 20 executables 3299 blocks used (approx) |