On Sep 13, 2010, at 3:14 PM, no-re...@cfengine.com wrote:

> Forum: Cfengine Help
> Subject: Re: Questions about the reference manual
> Author: mwlarsen
> Link to topic: https://cfengine.com/forum/read.php?3,18107,18209#msg-18209
> 
> neilhwatson Wrote:
> -------------------------------------------------------
> 
>> I don't see anything with a '->'.  
> 
> There isn't anything with that symbol in my example, but the documentation 
> has it everywhere, as in:
> 
> access:
> 
>  "/master/cfengine/inputs" -> { "update_policy", "other_promisee" },

Right.  The -> is used by the knowledge base, and it indicates that 
"/master/cfengine/inputs" is being promised to { "update_policy", 
"other_promisee" }

> 
>> I'm getting the
>> impression that you have no
>> programming experience.
> 
> You are correct. I write simple scripts (emphasis on simple) in perl and bash 
> to automate some sysadmin tasks, but I have never been a programmer.
> 
>> If, as you say, you
>> understood lines five and six then
>> I think you already have a grasp of what '=>'
>> means.
> 
> I understand what it means in those lines because of the context. ${d} is 
> clearly a reference to urecurse(d), and "exclude_dirs" followed by filesystem 
> paths is obvious. But I don't understand what it means in this context:
> 
> depth_search => urecurse("inf");
> 
>> It tells the left hand
>> side of '=>' to use the right hand side values.
> 
> Except that:
> 
> body depth_search urecurse(d) {
>      depth => "${d}";
>      exclude_dirs => { "\.svn" };
> }
> 
> looks like a block of code, not a value. I think the source of my confusion 
> is that I don't understand the relationship between the first reference to 
> depth_search/urecurse, and the second reference to them.

It is not a block of code, although I agree it could look like that.  It is a 
compound body.  What that means is the "depth_search" has many facets, and you 
can specify some or all of them, as you wish.  All bodies are named, and you 
refer to them by name, possibly passing in parameters.  In THIS case the name 
is "urecurse", and the single parameter is "d", although the body itself sets 
more of the compound collection of attributes than are simply passed in as 
parameters.  The "exclude_dirs" attribute is one that is set by the body, not 
the user of the body.

> 
>>>> Line 1 is from a promise.  Parts of a promise
>>> are
>>>> comprised of external body parts.
>>> 
>>> What promise is line 1 from? What are the
>>> "external body parts" you're referring to?
>> 
>> From the promise in your own example.
> 
> I guess I'll table this one.

If this is still a problem, contact me directly...

> 
>>>> Line 3 started the body part of the
>>> depth_search
>>>> type specifically named urecurse.  This name
>>> could
>>>> be anything.
>>> 
>>> I'm not grasping what you mean by "depth_search
>>> type specifically named urecurse". There are
>>> different types of depth_search?
>> 
>> To recrusively search down into a directory and
>> all or some of its
>> subdirectories.
> 
> Let me try again...
> 
> "depth_search type"
> 
> What does that mean? There are different types of depth_search?

Yes, exactly!  If you look in the COPBL 
(http://www.cfengine.org/manuals/CfengineStdLibrary.html#body-depth_005fsearch-recurse)
 you will see some EXAMPLEs of bodies that are provided with Cfengine.  You can 
write your own, too.

> 
> I don't mean to be a pain. I'm really frustrated. I feel like I'm missing 
> some pre-requisite knowledge the authors of cfengine assume all sysadmins 
> have.

Heh - as I have often stated, you're seeing "Mark", which is a specialized 
subset of "English".  I am working on clarifying this.  Feel free to contact me 
directly if you want... 

-Dan
d...@lonewolf.com

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

Reply via email to