[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 1


ckprereq Command

Purpose

Verifies that all prerequisite software is available and at the appropriate revision levels.

Syntax

ckprereq [ -v ] [ -Os } ] [ -f PrereqFile | -l FilesetName [ Level ] ]

Description

The ckprereq command determines whether the system level is compatible with the software product to be installed or updated.

The ckprereq command is designed to be used during the installation procedures of a software product.

When ckprereq is invoked with the -f flag, the PrereqFile parameter specifies a software prerequisite list file. Each record in this file contains information about a prerequisite fileset needed to complete the installation procedure.

When ckprereq is invoked with the -l flag, the prerequisite information is read from the ProductName information in the Software Vital Product Data (SWVPD) database.

If the PrereqFile parameter was given with the -f flag, then an output file is produced by the ckprereq command. The output file overwrites the input file and is a listing of the original input. Any failing lines are marked with a failure code in the first column. The ckprereq command ignores the failure codes if an output from a previous ckprereq call is used as input.

There are four possible requisite tests: prereq, coreq, ifreq,and instreq.

A prereq is a test to check that a fileset is installed and at a specified revision level. To be considered installed, the SWVPD entry for the software product must be in the APPLIED, APPLYING, COMMITTED, or COMMITTING state. A prereq requires that the fileset also be at the specified revision level before installing the independent fileset.

A coreq test is similar to a prereq, except that coreq tests can be installed in any order, but prereq tests require a specific order. If a corequisite software product is not yet installed, the test is ignored and the failure codes are not set because it is assumed that the software product will be installed. The coreq test is ignored by the ckprereq command. (It is not ignored by the installp command's requisite checking procedures.)

An ifreq test is identical to a coreq, except that it tests for the revision level only if the fileset is installed. If the fileset is not installed, the ifreq test is ignored.

An instreq test is treated like a prereq test by the ckprereq command. The special meaning of instreq is only used by the up-front requisite checks of the installp command.

The installp command checks corequisite and if-requisite filesets at the completion of an install set, and returns messages for any unsatisfied coreq or ifreq conditions. An if-requisite condition would be unsatisfied if the if-requisite product is installed, but does not match the revision level specified.

Flags


-f PrereqFile Specifies the file name of a prerequisite list file.
-l FilesetName[ Level ]
                          Specifies the name of the fileset or fileset update under which to look for the prerequisite information from the SWVPD database.
-O {r|u|s} Specifies the part of the file tree of the software product that is to be checked. If this flag is not specified, the ckprereq command uses the value of the INUTREE environment variable to determine which part to check. The INUTREE environment variable is set by the installp command. The r option indicates the / (root) part of the software product is checked. The u option indicates the /usr part of the software product is checked. The s option indicates the /usr/share part of the software product is checked. Only one part can be checked at a time.
-v Displays a descriptive message to standard error for each failure in the prerequisite list file.

Return Values

The ckprereq command tests the current version, release, modification level, fix level, and fix ID found in the SWVPD and marks the first column in each failing line in the output file with one of the following codes if the test was unsuccessful:

f The test for the fix (level) was unsuccessful.
m The test for the modification level was unsuccessful.
n The fileset is not installed or is set to broken.
p The test for the fix ID was unsuccessful.
r The test for the release was unsuccessful.
s There is a syntax error in the PrereqFile parameter.
v The test for the version was unsuccessful.

If a serious error occurs, such as an invalid command line or a syntax error in the prerequisite list file, the return code for the ckprereq command is 255. Otherwise, the return code is a number that represents the number of tests that failed.

Security

Access Control: You must have root authority to run this command.

Examples

  1. To check that the requisite specifications in the file /tmp/prq.test, that has the following contents:

       *prereq bos.rte 4.1.0.0
       *prereq X11.base.rte 4.1.0.0
    

    are satisfied, while reporting any failures, enter:

       ckprereq -vf /tmp/prq.test
    
  2. To check all the requisite software listed in the /usr/lpp/snaserv/prereq2 file for the root part, enter:

       ckprereq -f /usr/lpp/snaserv/prereq2 -Or
    
  3. To check that the requisites of the installed fileset update bos.net.tcp.client at level 4.1.0.1 are met, enter:

       ckprereq -l bos.net.tcp.client 4.1.0.1
    

Files


/etc/objrepos/product Database containing information about the software installed in the /root part of the file system.
/usr/lib/objrepos/product Database containing information about the software installed in the /usr part of the file system.
/usr/share/lib/objrepos/product Database containing information about the software installed in the /usr/share part of the file system.

Related Information

The installp command.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]