This just works for me with pcre. I did not complete the workaround
for posix (the problem is memory corruption in the posix rx lib) --
but I fixed this now in svn.
M
Brendan Strejcek wrote:
> Based on the debug output, it looks like the agent has figured out the
> correct course of action, but just hangs before applying the edits. I
> get the same behavior if I try without the method call.
>
> The code is below and gdb interaction is attached (didn't get a
> backtrace though because it didn't crash).
>
> ##########
>
> body common control { bundlesequence => { "test" }; }
>
> bundle agent test {
> methods:
> linux::
> "any" usebundle => EditPasswd("root","newpass");
> }
>
> bundle agent EditPasswd(user,cryptstring) {
> files:
> any::
> "/root/passwd"
> edit_line => ChangePassword(${user},${cryptstring});
> }
>
> bundle edit_line ChangePassword(user,cryptstring) {
> field_edits:
> "^${user}:.*"
> edit_field => Column(":","2","${cryptstring}","set");
> }
>
> body edit_field Column(split,col,newval,method) {
> field_separator => "$(split)";
> select_field => "$(col)";
> value_separator => ",";
> field_value => "$(newval)";
> field_operation => "$(method)";
> extend_fields => "true";
> allow_blank_fields => "true";
> }
>
--
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