On Wed, 1 Aug 2012 22:48:35 +0200 (CEST) neilhwatson wrote:
n> Empty lists seemed to be allowed:
No, unfortunately, I don't think you can get an empty slist with regular
syntax. I give you... the war of the spaces!
body common control
{
bundlesequence => { "test" };
}
bundle agent test
{
vars:
"spaces" slist => splitstring("", " ", "100");
"spaces2" slist => { };
reports:
cfengine::
"spaces '$(spaces)'";
"spaces2 '$(spaces2)'";
}
=>
Warning: Variable body for "spaces2" seems incomplete
Promise (version not specified) belongs to bundle 'test' in file
'/var/tmp/test.cf' near line 10
Warning: Variable body for "spaces2" seems incomplete
Promise (version not specified) belongs to bundle 'test' in file
'/var/tmp/test.cf' near line 10
Warning: Variable body for "spaces2" seems incomplete
Promise (version not specified) belongs to bundle 'test' in file
'/var/tmp/test.cf' near line 10
Warning: Variable body for "spaces2" seems incomplete
Promise (version not specified) belongs to bundle 'test' in file
'/var/tmp/test.cf' near line 10
Warning: Variable body for "spaces2" seems incomplete
Promise (version not specified) belongs to bundle 'test' in file
'/var/tmp/test.cf' near line 10
Warning: Variable body for "spaces2" seems incomplete
Promise (version not specified) belongs to bundle 'test' in file
'/var/tmp/test.cf' near line 10
R: spaces ''
R: spaces2 '$(spaces2)'
Warning: Variable body for "spaces2" seems incomplete
Promise (version not specified) belongs to bundle 'test' in file
'/var/tmp/test.cf' near line 10
Warning: Variable body for "spaces2" seems incomplete
Promise (version not specified) belongs to bundle 'test' in file
'/var/tmp/test.cf' near line 10
Warning: Variable body for "spaces2" seems incomplete
Promise (version not specified) belongs to bundle 'test' in file
'/var/tmp/test.cf' near line 10
Warning: Variable body for "spaces2" seems incomplete
Promise (version not specified) belongs to bundle 'test' in file
'/var/tmp/test.cf' near line 10
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine