help-cfengine
[Top][All Lists]
Advanced

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

RE: how to get ordering to work?


From: Wheeler, John
Subject: RE: how to get ordering to work?
Date: Fri, 6 Aug 2004 13:51:52 -0500

> I'm having a problem where I try to define classes with
> addclasses so that I can perform one portion of a shellcommands
section,
> then do some other stuff, and come back and do the rest of the
> shellcommands section.   In the code below what happens when I
> run it is that all of the shellcommands section executes and then
> the files section.   I want to execute the first part of the
> shellcommands,
> then the files, then the last part of the shell commands.
> What am I doing wrong here?
> 
> control:
> 
> addclasses = ( first last )
> actionsequence = ( shellcommands.first files shellcommands.last )
> 
> shellcommands:
> 
> first::
>   "/usr/bin/test ! -f /etc/cfengine-done"
>     define=afterkick
> 
> last::
>   "/$(rpmprog) $(rpminst) $(rpm_repos)/$(instrpms)"
> 
> 
> files::
>    /foor mode=0755 action=touch
> 

I think you just need to remove the addclasses directive from the
control section. The action sequence will activate the class "first"
and "last" when it runs that particular action. I have constructs
similar to the above all over the place.




reply via email to

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