Doh. You did the canonify already. I would have expected it to work too.

Best regards,
Emil Assarsson [email protected]
Phone: +46 (0)10 8017422



From: Assarsson, Emil
Sent: tisdag den 16 mars 2010 10:13
To: 'Ingersoll, Robert'; [email protected]
Cc: [email protected]; [email protected]
Subject: RE: canonify promise_repaired

If you use $(this.promiser) you must make sure that the name of the promise is 
suitable as a classname.
Take a look at this function: 
http://www.cfengine.org/manuals/cf3-reference.html#Function-canonify

I guess there is some room for improvement of the documentation.

Best regards,
Emil Assarsson [email protected]
Phone: +46 (0)10 8017422


From: [email protected] 
[mailto:[email protected]] On Behalf Of Ingersoll, Robert
Sent: måndag den 15 mars 2010 20:26
To: [email protected]
Cc: [email protected]; [email protected]
Subject: RE: canonify promise_repaired


I'm not sure if this is telling me it's unsupported, syntactically incorrect, 
or a bug?

cf-agent -KI -b test -f ./test.cf
 !!! No bundlesequence in the common control body
 >> Using command line specified bundlesequence
 -> Rotating files /tmp/alert.log in 10 fifo
Validation: Class item on rhs of lval 'class addition' given as { @-@ } is out 
of bounds (should match [a-zA-Z0-9_$()\[\].]+)
 -> Rotating files /tmp/alert.log in 10 fifo
Validation: Class item on rhs of lval 'class addition' given as { @-@ } is out 
of bounds (should match [a-zA-Z0-9_$()\[\].]+)


bundle agent test
{
vars:
        "LogRotate"     slist   => {
                                "/tmp/alert.log",
                                };

files:
        "$(LogRotate)"
                action          => ifelapsed("120"),
                classes         => repaired("logrotate_$(this.promiser)"),
                rename          => rotate("10");
}

body classes repaired(class)
{
promise_repaired => { canonify("$(class)") };
}



________________________________

The information transmitted is intended only for the person or entity to which 
it is addressed and may contain confidential and/or privileged material.  Any 
review, retransmission, dissemination or other use of, or taking of any action 
in reliance upon, this information by person or entities other than the 
intended recipient is prohibited.  If you received this in error, please 
contact the sender and delete the material from any computer.

[email protected]<mailto:[email protected]>
www.stginc.com<http://www.stginc.com>
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to