[augeas-devel] logrotate lense - multiple files

David Lutterkort lutter at redhat.com
Tue Jun 2 02:02:15 UTC 2009


On Tue, 2009-06-02 at 03:11 +0200, haerry+augeas at puzzle.ch wrote:
> However would the onlyif avoid unnecessary augeas calls?

Yes, it would - if nothing needs to be done, only one call would be made
to evaluate the onlyif condition; I doubt that it will save any time
though.

> It looks a bit ugly to do all that, but if understood it correctly the
> following reasons are responsible for it:

Yeah, I wish I had a simpler way to express what the tree is supposed to
look like, but don't really have a better language for that. There's
probably also some room to make the language for the 'changes' parameter
a little friendlier. Suggestions welcome ;)

> The normal file is just a single value, however to add an additional
> file to the logrotate, we need to transform this to a list. So we first
> remove the list, then create it and afterwards fill it up?

Yes, that's correct; this case is complicated by the fact that 'file'
nodes need to come first underneath a 'rule' node.

David





More information about the augeas-devel mailing list