Given this bundle:

bundle agent escape_test {

vars:
     'string'  string => "This'string_has\\stuff!\"in.it.";
     'escaped' string => escape(${string});

reports:
   linux::
     "String=${string}${const.n}Escaped=${escaped}";
}

A bit contrived, perhaps, but based on 
http://www.cfengine.org/manuals/cf3-reference.html#Function-escape
this should work, no?


[r...@hostname ~]# cf-agent --version
This comprises cf-agent core community version 3.0.3patch1 - (C) Cfengine AS 
2008-

[r...@hostname ~]# cf-agent -K -b escape_test
cf3:/var/cfengine/inputs/escape.cf:219,41: Unknown built-in function escape(), 
near token ')'
cf3:/var/cfengine/inputs/escape.cf:238,41: Unknown built-in function escape(), 
near token ')'
No such FnCall "escape()" in promise @ /var/cfengine/inputs/escape.cf near line 
219
No such FnCall "escape()" in promise @ /var/cfengine/inputs/escape.cf near line 
238
Fatal cfengine error: Unknown type X in CopyRvalItem - should not happen
cf-agent was not able to get confirmation of promises from cf-promises, so 
going to failsafe
Bundle "escape_test" listed in the bundlesequence was not found
Fatal cfengine error: Errors in agent bundles


Also tried using the latest SVN release (r864), and got the same result.

-- 
Jesse Becker
NHGRI Linux support (Digicon Contractor)
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to