help-cfengine
[Top][All Lists]
Advanced

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

Re: Module variables being set late


From: Chip Seraphine
Subject: Re: Module variables being set late
Date: Fri, 9 Jan 2004 08:14:46 -0600
User-agent: KMail/1.5

Q:      How was it that God managed to create the world in only six days?
A:      No installed user base.

:-)

On Friday 09 January 2004 06:44, you wrote:
> This is another reason why I have not altered the behaviour. I do not
> want to catch anyone by surprise. I have considered solving the problem
> in a different way, but that will require more work,
>
> M
>
> On  8 Jan, Chip Seraphine wrote:
> > Sounds useful, although if the patch is incorproated it should be
> > controlled by a command-line option or something( since it changes
> > behavior).
> >
> > Unfortunately, this doesn't really address what is breaking me--  the
> > problem I'm having is that modules appear to be executing in a sequence
> > that seems at odds with the actionsequence definition.
> >
> > On Wednesday 07 January 2004 17:37, Wipf, Stefan wrote:
> >> I previously posted a simple patch for nesting imports:
> >> Sorry, I don't remember which version of cfengine,
> >> but the patch is simple enough.
> >>
> >>
> >>
> >> diff parse.c.original parse.c.fix
> >> 127c127
> >> < { struct Item *ptr;
> >> ---
> >>
> >> > { struct Item *ptr, *nextptr
> >>
> >> 216c216,224
> >> <    ParseFile(filename,sp);
> >> ---
> >>
> >> >    nextptr = ptr->next;
> >> >    while (VIMPORT != NULL) { VIMPORT = VIMPORT->next; }
> >> >    ParseFile(filename,sp);
> >> >    if (VIMPORT != NULL)
> >> >       {
> >> >       ptr->next = VIMPORT;
> >> >       while (VIMPORT->next != NULL) { VIMPORT = VIMPORT->next; }
> >> >       VIMPORT->next = nextptr;
> >> >       }
> >>
> >> This patch will change the behavior as follows:
> >>
> >> example:
> >>
> >> cfagent.conf:
> >>  import:
> >>   cf.classes
> >>   cf.variables
> >>   cf.main
> >>
> >> cf.classes:
> >>  import:
> >>   cf.classes1
> >>   cf.classes2
> >>   ...
> >>
> >> Without the patch:
> >> importing cf.classes
> >> importing cf.variables
> >> importing cf.main
> >> importing cf.classes1
> >> importing cf.classes2
> >>
> >> With the patch:
> >> importing cf.classes
> >> importing cf.classes1
> >> importing cf.classes2
> >> importing cf.variables
> >> importing cf.main
> >>
> >> address@hidden wrote:
> >> > On  7 Jan, Wheeler, John wrote:
> >> > >>If you
> >> > >> follow
> >> > >> the suggested structure and use cfagent.conf only to import the
> >> > >
> >> > > content
> >> > >
> >> > >> of the configuration, then it never matters that imports are done
> >> > >> "at
> >> > >
> >> > > the
> >> > >
> >> > >> end".
> >> > >
> >> > > [Wheeler, John]
> >> > > I didn't realize this was a
> >> > > limitation/feature/characteristic/property (i.e. don't read into the
> >> > > adjective) of cfengine. I have many nested imports of cfengine some
> >> > > as deep as 5 levels.
> >> > >
> >> > > Is this bad? Will this fail with future releases of cfengine?
> >> >
> >> > No - nesting is ok. But the nesting is evaluated linearly.
> >> > Nested evaluation is technically challenging and not something
> >> > I want to spent time on.
> >> >
> >> > M
> >> >
> >> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >> > Work: +47 22453272            Email:  address@hidden
> >> > Fax : +47 22453205            WWW  :  http://www.iu.hio.no/~mark
> >> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >> >
> >> > _______________________________________________
> >> > Help-cfengine mailing list
> >> > address@hidden
> >> > http://mail.gnu.org/mailman/listinfo/help-cfengine
> >
> > _______________________________________________
> > Help-cfengine mailing list
> > address@hidden
> > http://mail.gnu.org/mailman/listinfo/help-cfengine
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Work: +47 22453272            Email:  address@hidden
> Fax : +47 22453205            WWW  :  http://www.iu.hio.no/~mark
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~





reply via email to

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