All,

I've just started to use cfengine at my company and we have a mixture of Linux, 
Solaris & AIX. I want to check for packages across all of these system and 
examples are available for Linux & Solaris however not for AIX. Here is what I 
have so far but it isn't working. I suspect it is something to do with my regex.

body common control
{
bundlesequence => { "packages" };
}

#############################################

bundle agent packages
{
vars:

  "package_name"                string => "idsldap.cltbase61.rte";

packages:

  "$(package_name)"

     package_policy => "verify",
     package_method => aix_lpp,
     package_version => "6.1.0.3";

}

#############################################

body package_method aix_lpp

{
aix::

package_changes => "individual";

package_list_command => "/usr/bin/lslpp -Or -cl";

package_list_name_regex    => "^[^:]+\:([^\s:]+)";
package_list_version_regex => "^[^:]+\:[^:]+\:([^\s:]+)";

# package_installed_regex => "^[^:]+\:[^:]+\:[^:]+\:\:([^\s:]+)";
package_installed_regex => "^[^:]+\:[^:]+\:[^:]+\:\:(COMMITTED|APPLIED)";

package_name_convention => "$(name)";

package_add_command => "/bin echo dummy";
package_delete_command => "/bin echo dummy";
package_verify_command => "/usr/bin/lppchk -fm3";

}

The output of the package_list_command is as follows:-

# /usr/bin/lslpp -Or -cl | grep ids
/etc/objrepos:bos.rte.serv_aid:6.1.2.2::COMMITTED:F:Error Log Service Aids:
/etc/objrepos:bos.sysmgt.serv_aid:6.1.2.2::COMMITTED:F:Software Error Logging 
and Dump Service Aids:
/etc/objrepos:bos.sysmgt.trace:6.1.2.4::COMMITTED:F:Software Trace Service Aids:
/etc/objrepos:idsldap.clt32bit61.rte:6.1.0.3::COMMITTED:I:Directory Server - 32 
bit Client:
/etc/objrepos:idsldap.clt64bit61.rte:6.1.0.3::COMMITTED:I:Directory Server - 64 
bit Client:
/etc/objrepos:idsldap.cltbase61.rte:6.1.0.3::COMMITTED:I:Directory Server - 
Base Client:
#

To verify a package we have to use lppchk which by default has no output but 
with the m3 flag produces the following if the package is ok.

# lppchk -fm3 idsldap.clt32bit61.rte
lppchk: 0504-230  28 files have been checked.
lppchk: 0504-230  0 files have been checked.

And the following if the package is not found

# lppchk -fm3 idsldap.clt32bit61.dummy
lppchk: 0504-226  No fileset entries were found that match the name - 
idsldap.clt32bit61.dummy.
lppchk: 0504-227  No files were found that matched the file name given for 
fileset idsldap.clt32bit61.dummy.

Not really sure how to deal with that?

Any cfengine gurus have any suggestions?

Thanks in advance.
Stephen Jones



_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to