I copied over evalfunction.c from svn (I cannot get cfengine to build from svn for some reason), and now the messages are:
cf3 Could not read expected amount from file /var/opt/cfengine/cf_hosts in readfile cf3 (fread: Error 0) The question I have is - does readstringarray only run at the start of the cf-agent run during the variable convergence? Say, for example, the file that readstringarray changes during in other agent bundles, it seems that the readstringarray no longer relfects the correct values as it is only parse once during the start. On Thu, Apr 9, 2009 at 1:05 PM, Mark Burgess <[email protected]> wrote: > > Fixed in svn > > Matt Richards wrote: >> Here is an odd one. It seem like the file in readstringarray is >> checked right away, instead of waiting for bundle to resolve the >> parameter: >> >> ### >> >> bundle agent foo { >> >> "/etc/foo" >> edit_line => delete_users("$(sys.workdir)/userfile"); >> >> } >> >> ### >> bundle edit_line delete_users(filename) { >> >> vars: >> >> "userarray" int => >> readstringarray("users","$(filename)","#[^\n]*",":",100,40000); >> "user_list" slist => getindices("users"); >> >> delete_lines: >> "^$(user_list):.*"; >> >> } >> >> # cf-agent -Kv >> >> ... >> >> cf3 Could not examine file $(filename) in readfile >> cf3 (stat: No such file or directory) >> cf3 Could not examine file $(filename) in readfile >> cf3 (stat: No such file or directory) >> cf3 Initiate variable convergence... >> cf3 Could not examine file $(filename) in readfile >> cf3 (stat: No such file or directory) >> cf3 Initiate control variable converge >> _______________________________________________ >> Bug-cfengine mailing list >> [email protected] >> https://cfengine.org/mailman/listinfo/bug-cfengine > > -- > Mark Burgess > > ------------------------------------------------- > Professor of Network and System Administration > Oslo University College, Norway > > Personal Web: http://www.iu.hio.no/~mark > Office Telf : +47 22453272 > ------------------------------------------------- > _______________________________________________ Bug-cfengine mailing list [email protected] https://cfengine.org/mailman/listinfo/bug-cfengine
