Creating custom collectors for UNIX systems
You can create custom connectors if the basic set collectors do not collect values for
the prerequisite properties required for the product to be installed. When you
create custom collectors, the file name must be the same as the prerequisite
property though without the subtype in its name. The collector is stored in
the
/UNIX_Linux
subdirectory. The collector can contain code to obtain actual values
for one or many prerequisite properties. It can also use the common functions to
obtain those values if required.
Before you begin
Ensure that you review the set of functions in the following appendixes before you
create the collectors. Determine whether you can use any of them to obtain the
actual 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
Determine whether the collector must check that the prerequisite property exists
and if it does, what other information must be gathered. Each check must return a
value, whether one exists. For example:
v
Check whether a product is installed, for example, a package installed with
RPM.
v
Check what version of the product is installed.
v
Check whether the available disk space for a mounted file system
If you want to use subtypes,
suffix_identifier
, and further categorize a prerequisite
property by application, utility, or service subtype, you can create a common
collector. Pass the differentiator for the
suffix_identifier
subtype, that is,
differentiator_suffix_identifier
to its collector. For example,
os.package
is the common
collector to check for the existence of packages. To check for the existence of
openssh
, pass the name of the package when invoking the
os.package
collector in
the
packageTest.sh
script file, as follows:
./os.package openssh
Where
openssh
is the name of the package, that is, the
suffix_identifier
subtype and
the
differentiator_suffix_identifier
differentiator.
Procedure
1.
Create a shell script file. Save the file in the
ips_root
/Unix_Linux
directory, with
a variant of the following file naming convention but without a file extension:
[
prefix_identifier
.]
property_name
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, for example,
env
.
v
property_name
is the name of the prerequisite property, for example,
path.jre
2.
Using an editor, open the file and include the path to the
common_function.sh
if
you must use common functions, as follows:
. ../lib/common_function.sh
50
Prerequisite Scanner: User's Guide
Summary of Contents for Prerequisite Scanner
Page 1: ...Prerequisite Scanner Version 1 1 1 10 User s Guide ...
Page 2: ......
Page 3: ...Prerequisite Scanner Version 1 1 1 10 User s Guide ...
Page 8: ...vi Prerequisite Scanner User s Guide ...
Page 10: ...viii Prerequisite Scanner User s Guide ...
Page 40: ...Figure 6 result txt file on Windows systems 30 Prerequisite Scanner User s Guide ...
Page 46: ...36 Prerequisite Scanner User s Guide ...
Page 68: ...58 Prerequisite Scanner User s Guide ...
Page 78: ...Figure 11 precheck log file with the debug data 68 Prerequisite Scanner User s Guide ...
Page 84: ...74 Prerequisite Scanner User s Guide ...
Page 88: ...78 Prerequisite Scanner User s Guide ...
Page 92: ...82 Prerequisite Scanner User s Guide ...
Page 116: ...106 Prerequisite Scanner User s Guide ...
Page 122: ...112 Prerequisite Scanner User s Guide ...
Page 136: ...126 Prerequisite Scanner User s Guide ...
Page 138: ...128 Prerequisite Scanner User s Guide ...
Page 140: ...130 Prerequisite Scanner User s Guide ...
Page 158: ...148 Prerequisite Scanner User s Guide ...
Page 164: ...154 Prerequisite Scanner User s Guide ...
Page 166: ...156 Prerequisite Scanner User s Guide ...
Page 170: ...160 Prerequisite Scanner User s Guide ...
Page 171: ......
Page 172: ... Printed in USA ...