Forum: Cfengine Help
Subject: Re: creating a list from a list and a var (or even 2 lists) by
interpolation
Author: svenXY
Link to topic: https://cfengine.com/forum/read.php?3,21397,21420#msg-21420
an interesting approach, thanks. However, on my box (ubuntu 10.04 with 3.x.x)
it segfaults:
body common control
{
bundlesequence => { 'test' };
inputs => { 'cfengine_stdlib.cf' };
}
bundle agent test
{
vars:
"oct2" string => '20';
"oct4" slist => { '11', '12' };
"separator" string => ",";
"prefix" string => "10.${oct2}.20";
"temp_namelist" slist => { " ", @(oct4) };
"nameserv" slist => grep (
"^[^\s]+$",
splitstring (
join("${separator}${prefix}", "temp_namelist"),
"$(separator)",
"99999999999"
)
);
files:
"/tmp/resolv.conf"
edit_line => resolvconf('abc.de', @(nameserv)),
classes => if_ok('yep');
reports:
linux::
"$(nameserv)";
}
$ ../bin/cf-agent -K -f result.cf
Segmentation fault
[...] failsafe stuff
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine