Forum: CFEngine Help Subject: Re: Reporting Author: toddnni Link to topic: https://cfengine.com/forum/read.php?3,24824,24834#msg-24834
It says in the reference manual "If none of the attributes kept_returncodes, repaired_returncodes, or failed_returncodes are set, the default is to consider a return code zero as promise repaired, and nonzero as promise failed." But if you need to use different return codes here is an example body body classes repaired_w_class(code_repaired, cl_repaired) { repaired_returncodes => { "$(code_repaired)" }; promise_repaired => { "$(cl_repaired)" }; } and it can be used like this commands: start_smb:: "/sbin/service smbd restart"' classes => repaired_w_class("3", "restarted_smb"); _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine