[augeas-devel] Re: [Puppet Users] Testing help for new Augeas Puppet provider which only executes if required

David Lutterkort lutter at redhat.com
Fri Feb 20 22:39:54 UTC 2009


On Fri, 2009-02-20 at 07:53 -0500, Bryan Kearney wrote:
> One question.... If I have a file with 10 nodes, does augeas re-write 
> the whole file, or just scan for the nodes which changed?

It will write a new file (into a tmp location) and then replace the old
file with the new one. Since rename(2) is the only way to modify files
atomically, it's generally a bad idea to modify files that could be in
the process of being read/written by others in place[1].

David

[1] Augeas will fall back to modifying in place under certain
circumstances, most importantly when the file is bindmounted, since you
can't use rename in that case.





More information about the augeas-devel mailing list