help-cfengine
[Top][All Lists]
Advanced

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

Re: Puzzler: Can cfengine replace make?


From: Gregory P. Smith
Subject: Re: Puzzler: Can cfengine replace make?
Date: Thu, 8 Nov 2001 19:28:18 -0800
User-agent: Mutt/1.2.5i

> > So basically, there shouldn't be a need to do once-only actions with
> > cfengine.  If you do need them, then you can certainly simulate them
> > with a class defined from "/bin/test -f $SOMEFILE", and "/bin/touch
> > $SOMEFILE" in your shellcommands section.
> 
> That's the closest I've been able to get to what I'm looking for.  But
> it's a lot cleaner to write that in 'make', which is where I keep
> ending up.  
> 
> Anyone else see a syntax that might work?

With existing cfengine v1 the manual test for some file (either part of a
package or one that you touch in the action) is the best you can get.  But
an extension that could be made (and indeed might exist?  I haven't taken
the time to check out v2 yet) such as adding a onceonlycommands section to
augment shellcommands that would take care of the conditional execution
test and set (touch) operation for you.  keeping the onceonlycommands
state would probably be easiest if another cfengine setting in the script
could be used to set the path of the state directory/database.

This is doing the same thing, but would make it simple and convenient
to do it.

Greg




reply via email to

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