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
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.
2.
Add the code to compare the actual and expected values that are passed to the
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
3.
Run the custom evaluator to ensure that there are no runtime errors and debug
as necessary.
Chapter 3. Extending Prerequisite Scanner
57
Содержание Prerequisite Scanner
Страница 1: ...Prerequisite Scanner Version 1 1 1 10 User s Guide ...
Страница 2: ......
Страница 3: ...Prerequisite Scanner Version 1 1 1 10 User s Guide ...
Страница 8: ...vi Prerequisite Scanner User s Guide ...
Страница 10: ...viii Prerequisite Scanner User s Guide ...
Страница 40: ...Figure 6 result txt file on Windows systems 30 Prerequisite Scanner User s Guide ...
Страница 46: ...36 Prerequisite Scanner User s Guide ...
Страница 68: ...58 Prerequisite Scanner User s Guide ...
Страница 78: ...Figure 11 precheck log file with the debug data 68 Prerequisite Scanner User s Guide ...
Страница 84: ...74 Prerequisite Scanner User s Guide ...
Страница 88: ...78 Prerequisite Scanner User s Guide ...
Страница 92: ...82 Prerequisite Scanner User s Guide ...
Страница 116: ...106 Prerequisite Scanner User s Guide ...
Страница 122: ...112 Prerequisite Scanner User s Guide ...
Страница 136: ...126 Prerequisite Scanner User s Guide ...
Страница 138: ...128 Prerequisite Scanner User s Guide ...
Страница 140: ...130 Prerequisite Scanner User s Guide ...
Страница 158: ...148 Prerequisite Scanner User s Guide ...
Страница 164: ...154 Prerequisite Scanner User s Guide ...
Страница 166: ...156 Prerequisite Scanner User s Guide ...
Страница 170: ...160 Prerequisite Scanner User s Guide ...
Страница 171: ......
Страница 172: ... Printed in USA ...