|
From: | Alexander Jolk |
Subject: | SetState suggestion (was Re: Ordering and cfengine 3) |
Date: | Wed, 18 May 2005 18:49:58 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) Gecko/20030708 |
SetState("preserved_class",10,Preserve) SetState(non_preserved_class,60,Reset) UnsetState(myclass)
Could we have states that preserved a numerical or textual value as well? Something like
SetState("preserved_value",10,Value,"5") SetState("preserved_value",10,Value,"$(preserved_value)+4") so that later on, one can do do_action = ( GreaterThan($(preserved_value),10) ) and of course clear the value once the corrective action has been done.This would be useful for fuzzy-logic type actions; I thought of it in the context of copying a large directory tree: I run the copy anyway once a day, but if one or more crucial files were missing, I would run it earlier, depending on the number of missing files.
Does that strike anyone as useful? Alex -- Alexander Jolk / BUF Compagnie tel +33-1 42 68 18 28 / fax +33-1 42 68 18 29
[Prev in Thread] | Current Thread | [Next in Thread] |