Creating Custom Evaluators For Unix Systems - IBM Prerequisite Scanner User Manual

Table of Contents

Advertisement

Creating custom evaluators for UNIX systems

You can create custom evaluators if the custom collector does not return boolean
values, that is, True or False. When you create custom evaluators, the file name
must end with _compare and stored in the /UNIX_Linux subdirectory. The custom
evaluator can use the common functions to compare the values if required.
Before you begin
Ensure that you review the set of functions in the following appendixes before you
create the custom evaluators. Determine whether you can use any of them to
compare the actual and expected values:
v Appendix I, "Common functions for UNIX systems," on page 135
v Appendix J, "Other functions for UNIX systems," on page 141
v Appendix K, "Logging utility functions for UNIX systems," on page 149
There are two script files that you can use as a starting point, that is, ._compare.sh
and _compare.sh in the /Unix_Linux subdirectory.
Important: Do not create custom evaluators if your custom collectors return True
or False. IBM Prerequisite Scanner uses predefined evaluators for any collector
that returns boolean values.
Procedure
1. Create a shell file. Save the file in the ips_root/UNIX_Linux directory, with a
2. Add the code to compare the actual and expected values that are passed to the
3. Run the custom evaluator to ensure that there are no runtime errors and debug
variant of the following file naming convention:
[prefix_identifier.]property_name[.suffix_identifier]_compare.sh
where:
v prefix_identifier is an identifier for a predefined category of prerequisite
properties as outlined in Table 3 on page 4. This prefix identifier is required
by some of the predefined categories.
v property_name is the name of the prerequisite property.
v suffix_identifier is an optional identifier for a subtype of prerequisite
properties as outlined in Table 4 on page 6.
evaluator as arguments and associated functions. Ensure the comparison
returns standard output as follows:
v "PASS" when the expected value for the prerequisite property is equal to or
greater than the actual value for the prerequisite property
v "FAIL" when the expected value for the prerequisite property does not equal
the actual value for the prerequisite property
as necessary.
Chapter 3. Extending Prerequisite Scanner
57

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Prerequisite Scanner and is the answer not in the manual?

Questions and answers

Table of Contents