help-cfengine
[Top][All Lists]
Advanced

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

Re: Getting $(allclasses) into a shellcommand


From: Russell Adams
Subject: Re: Getting $(allclasses) into a shellcommand
Date: Mon, 19 Jul 2004 14:56:00 -0500
User-agent: Mutt/1.4.2.1i

This is waaay backward, but when run in verbose mode cfengine displays
its class list when it hits the main execution phase.

How about using a standardized logfile, and parsing your own logfile
for the classes line during execution?

You may not get that kind of logging via cfexecd, however, you can
just put the package management into an executable cfengine script and
run it as a shellcommand.

I've pulled similar tricks in the past to make a job examine its own
error log to look for errors from apps that didn't give proper exit codes.

Russell


On Mon, Jul 19, 2004 at 02:38:59PM -0500, Chip Seraphine wrote:
> The problem is doing the writing.  Unless I do something expensive involving 
> an iterator, I can't get the class list into the file at all (even with 
> editfiles).
> 
> On Monday 19 July 2004 14:09, Ted Zlatanov wrote:
> > How about writing the list of classes into $cfinputs/classes.$$ where
> > $$ is the PID of the cfagent run?  This can be passed as a variable
> > to spawned processes thereafter (CFCLASSFILE, for example).  It's a
> > temporary file but harmless if it's left around.
> > 
> > I can think of other solutions involving IPC but those are uglier by
> > far.
> > 
> > Ted
> > 
> 
> -- 
> 
> Chip Seraphine
> Unix Administrator
> TradeLink, LLC
> 312-264-2048
> chip@trdlnk.com
> 
> 
> 
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-cfengine




reply via email to

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