[augeas-devel] [Fwd: [Puppet Users] Re: Augeas and grub.conf]

David Lutterkort lutter at redhat.com
Fri Aug 7 00:49:19 UTC 2009


On Fri, 2009-08-07 at 07:26 +1000, Matthew Palmer wrote:
> > Could augeas be clever about this? If it indexed files by fsid/inode, it  
> > could link parts of the tree that pointed to the same file. In the case  
> > of a symlink it would obviously have to follow it to a real file.
> 
> I'm thinking that fully recognising and emulating symlinks is probably the
> Right Thing To Do.  Basically, if a detected file is a symlink, then Augeas
> remembers that, and any changes to the "symlinked" subtree actually happen
> in the "real file" subtree.  When the tree is saved, the symlinked version
> is ignored and the real file is saved to (which also nicely works around the
> cross-device mv/link problem).
> 
> Whether that's more work than it's worth isn't my call, but that seems like
> the "least surprise" method of handling the situation.

I am not a big fan of putting a notion of 'symlink' into the tree data
structure since it complicates internals considerably (dangling symlinks
after you delete the target file in the tree, evaluation of path
expressions etc.) and doesn't solve the issue at hand any better, since
there's no /etc/grub.conf in Debian anyway.

I'd much favor a solution that would add some sort of bidirectional tree
<-> tree transform that simply renames the tree so that it always
appears in the same place, no matter what OS you're on. But that's not
all that simple, either.

David





More information about the augeas-devel mailing list