Hi! I used cfengine successfully a decade ago. Now I'm trying to use it
again.

I'm trying to get started with cfengine3 using the example config files. I
noticed a few elements from cfengine_stdlib.cf are redefined in site.cf,
update.cf, and library.cf. I was surprised that the example configuration
files don't work with the standard library.


The stdlib's body action immediate { ifelapsed => "0"; }  but update.cf's
version has { ifelapsed => "1"; }. Is there any harm in using "0" instead of
"1"? Should one of them be renamed to almost_immediate?


In the documentation, process_select is sometimes documented as
select_process. Are both valid?


In the documentation, "left hand side" is misspelled "left hand size".


When using process_select, is it possible to pass the regex process selector
(the leftmost string) to the process_select body? I wanted to match named
processes only if they were owned by a particular owner. I wound up with:

processes:
    ".*" process_select => process_owner("foobar .*", "root");

...

body process_select process_owner(command, owner) {
    command => "$(command)";
    process_owner => { "$(owner)" };
    process_result => "!(command.process_owner)";
}

but I wanted something like:

processes:
    "foobar .*" process_select => process_owner("$(lhs)", "root");


How do I use readtcp with an empty "data to send" string, to set a class if
a port is (not) accepting connections? I wound up sending something and
checking the string against regcmp(".+", "$(data_read)");


How do I read a pid from a pid file for use in processes: ?


Thanks,

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

Reply via email to