[Top][All Lists]

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

Re: Feature request: Ability to parse files with a custom parser

From: Knut Auvor Grythe
Subject: Re: Feature request: Ability to parse files with a custom parser
Date: Thu, 24 Feb 2005 12:51:44 +0100
User-agent: Mutt/1.4.2i

On Thu, Feb 24, 2005 at 03:45:01PM +1100, Tim Nelson wrote:
>> Since cfengine is doing all comparisons etc on the m4 file, while we
>> really are interested in keeping the output file up to date, we need to
>> do all the checks cfengine normally would have done on the output file
>> manully.
>       By this, do you mean that the groups section duplicates something 
> that you think "copy" should be doing?

Yes. cfengine already compares timestamps, does checksumming, sets
permissions and pretty much everything we need, but is unaware of the
output file. So we get all the fancy functionality on the m4 file (which
we don't want to have there at all), and have to do the tests on the
output file with manual rules in the groups section.

Being able to compare mtimes on the m4 file and the output file
(assuming that the timestamp on the output file gets adjusted to the
same as the m4 file after parsing) and being able to do checksumming
between the output and the existing file would be lovely.

In my example I also omitted setting permissions, in our setup that is
done by an extra argument to each of the wrappers right now. Not very
nice, but necessary. You do not necessarily want the same permissions on
an m4 file (which contains info on your entire network) and the output
file containing only local settings.

Basically, I would like cfengine to be aware of the parsed output, not
the m4 file (although being aware of both is okay) :-)

>> One would probably make custom site-specific wrappers anyway, so I think
>> one would manage to make all the wrappers use one of the two (for
>> instance stdin/stdout).
>       Yeah, I guess my assumption was that wrappers would be made for 
> the non-conforming group, and I figured that the stdin/stdout group was 
> larger than the command-line-with-no-switches group.

Actually, to be aware of $CFALLCLASSES pretty much all parsers would
need a wrapper, so it wouldn't make any difference ;-)

Knut Auvor Grythe
ITEA Systemdrift

reply via email to

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