Checking the Installation of a Package

You can use the pkgchk command to check the completeness, specific path name, file contents, and file attributes of an installed package.

The pkgchk command has the following syntax.

pkgchk pkgid
					

For example, to check the package SUNWman, the online manual pages, type pkgchk SUNWman and press Return. If the prompt comes up without any messages, the package has installed properly.

oak% pkgchk SUNWman
oak%

If you do get messages, however, the package has not installed properly, as shown in the following example.

oak% pkgchk SUNWssoft
WARNING: no pathnames were associated with <SUNWssoft>
oak%

NOTE

pkgchk also reports errors if the package was installed correctly but any files or directories that are part of the package subsequently had their contents or attributes modified.


You can specify more than one package identifier by typing a list separated by spaces. If you do not specify a pkgid, the complete list of packages on a system is checked.

You can check the installation completeness of a specific path name—where the path name refers either to an absolute path name to a file or to a directory—with the pkgchk -p option, which has the following syntax.

pkgchk -p pathname
					

If you want to check more than one path, provide the paths as a comma-separated list.

You can check the installation completeness of just the file attributes with the pkgchk -a option. You can check the installation completeness of just the file contents with the pkgchk -c option. The syntax for these options is shown below.

/usr/sbin/pkgchk [ -a | -c ] pkgid
					

You can use the -d option to pkgchk to display information about packages stored in a file system, in a raw package datastream on a device, or the same raw package datastream saved in a file in a file system. To check the completeness of a spooled package, use the pkgchk -d option. This option looks in the specified directory or on the specified device and performs a check of the package. In the following example, the pkgchk command looks in the spool directory spool-dir and checks the completeness of the package named pkgA.


# /usr/sbin/pkgchk -d spool-dir pkgA
					

NOTE

Spooled package checks are limited because not all information can be audited until a package is installed.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.78.252