Forum: CFEngine Help
Subject: Re: Promises repaired in promise_summary
Author: simonblake
Link to topic: https://cfengine.com/forum/read.php?3,24595,24598#msg-24598

returnszero and execresult don't count as repaired promises, so if you're 
running commands to establish the state of the system, they can be a good way 
to reduce the number of repairs reported every run.  So instead of doing

commands:
  "/bin/mountpoint -q /var/lib/vz1"
    contain => in_shell;
    classes   => if_ok("vz1_is_mounted");

do something like:

classes:
  "vz1_is_mounted"    expression => returnszero("/bin/mountpoint -q 
/var/lib/vz1","noshell");

You probably don't want to be doing this for commands that change the system, 
but it is good for investigatory commands.

Cheers
Simon

_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to