I see you don't have quotes around your reports promise, which probably
invalidates the whole bundle.
reports:
!xyz::
"
<html>
....
</html>
";
On 12/18/2011 02:59 AM, Carl E. Ma wrote:
Hi,
I am trying to create a checking script to report core files on my
server. But it keeps complaining no defined bundle, which I did. The
line number "5,31" doesn't make sense either. What did I miss?
Thanks,
carl
$ ./1.cf
cf3> ./1.cf:5,31: syntax error, near token '.'
Bundle "“invalidfiles”" listed in the bundlesequence is not a defined
bundle
Fatal cfengine error: Errors in promise bundles
cf-agent was not able to get confirmation of promises from
cf-promises, so going to failsafe
!!! No bundlesequence in the common control body
Fatal cfengine error: Errors in promise bundles
$more 1.cf
#!/usr/local/sbin/cf-agent -f
body common control
{
bundlesequence => { “invalidfiles” };
inputs => { “cfengine_stdlib.cf” };
version => “1.0.0”
}
bundle agentinvalidfiles
{
files:
“dir_list” slist =>
{“/etc”,”/var/spool/mail”,”/var/core”,”/var/tmp”,”/tmp”};
file_select => cores
}
body file_select cores
{
leaf_name => {“$dir_list/*.core”,”$dir_list/core.*” };
file_result => "leaf_name";
reports:
<html>
Time: $(sys.date)<br>
Please arrange to remove following core files - $file_result.<br>
</html>
}
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine