help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: method: returnclasses not working


From: Knut Auvor Grythe
Subject: Re: method: returnclasses not working
Date: Thu, 14 Jul 2005 23:14:47 +0200
User-agent: Mutt/1.5.6i

On Thu, Jul 14, 2005 at 09:49:39PM +0200, Mark Burgess wrote:
> Brian - read the docs. Your class has to be prefixed with
> the module name

Oh, so the last example in http://www.cfengine.org/confdir/methods.html
is simply wrong? Relevant snippets:

    control:
        MethodName       = ( GetEnvironmentAnalysis )

    classes:
        class1 = ( any )

    alerts:
        ReturnClasses(class1,class2)

I used that example to make my method, but couldn't manage to get it
working. I saw "# Note that the return variables are prefixed with the
method space" in the example before that, and based on that I assumed
this was done automatically. After all, the term used was "are", not
"must be". I therefore tried various combinations of prefixing in the
cfagent.conf file calling the method, with no luck.

In another example, http://www.cfengine.org/confdir/backup.html, the
class "done" is returned from a method called BackupLapTop. Is this also
wrong?

I must say that these particular sites are kind of confusing. Are there
some other docs on methods one should rather read? If not, isn't it kind
of silly to criticise people for not reading the docs if the docs are
filled with malfunctioning examples?

Oh well, enough whining, let's be a bit constructive instead =) 
It would be really nice if cfengine could issue a warning about this
instead of just silently omitting the class. It would certainly be
helpful for debugging.

-- 
Knut Auvor Grythe
ITEA Systemdrift




reply via email to

[Prev in Thread] Current Thread [Next in Thread]