Actually, cf-promises WILL parse the file for syntax errors.  While not exactly 
the case, classes are "run time" and syntax is "compile time" (except, as you 
correctly observer, when classes are used for selective compilation).  So you 
could do this:

        cf-promises -Dmonitor

and get your desired syntax checking :-)

-Dan

On Mar 31, 2011, at 4:55 AM, Bas van der Vlies wrote:

> On 30-03-11 21:38, Seva Gluschenko wrote:
>> Perhaps, because it doesn't make much sense, since cf-promises only
>> verifies files and exits, taking no actions.
>> 
> 
> Maybe your answer is valid. I use the hard classes to only include the 
> right configuration file for the different cfengine3 executables, eg:
>  monitor::
>     inputs          => {
>         "cf-monitord.cf"
>     };
> 
> Now this file won't be parsed by cf-promises for syntax errors. So it would 
> be handy if cf-promises sets a hard class.
> 
> We have different clusters with different setups. The set of configuration 
> files differ on each cluster. The way cf-promises works is it only parses 
> the configuration files that will be includes for that cluster.
> 
> cf-promises can completely by-passed if you use the right classes. It will 
> only parse promises.cf and only complain that there is no bundlesequence 
> defined.
> 
> 
> 
>> 2011/3/30 Bas van der Vlies<b...@sara.nl>:
>>> 
>>> 
>>> Have question about this command. All cfengine programs set a hard class:
>>> cf-monitor -->  monitor
>>> cf-agent     -->  agent
>>> cf-serverd -->  server
>>> cf-execd -->  executor
>>> 
>>> But cf-promises not. My question is why?
>>> 
>>> 
>>> --
>>> Bas van der Vlies
>>> b...@sara.nl
>>> 
>>> 
>>> 
>>> _______________________________________________
>>> Help-cfengine mailing list
>>> Help-cfengine@cfengine.org
>>> https://cfengine.org/mailman/listinfo/help-cfengine
>>> 
>> 
>> 
>> 
> 
> 
> -- 
> ********************************************************************
> *  Bas van der Vlies                    e-mail: b...@sara.nl       *
> *  SARA - Academic Computing Services   Amsterdam, The Netherlands *
> ********************************************************************
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@cfengine.org
> https://cfengine.org/mailman/listinfo/help-cfengine

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

Reply via email to