[augeas-devel] Creating new files from tree additions

Dean Wilson dean.wilson at gmail.com
Wed Apr 23 22:21:25 UTC 2008


I've got a lense that reads config files in from a main file and a
directory full of files (most of which have one line in them)

By adding leaves to the tree and saving I can add new lines to either
type of file but I can't seem to make augtool create new files by
adding new nodes under the directory in the tree. Should I be able to
do this with augtool?

Example -
/etc/apt/sources.list
/etc/apt/sources.list.d/foo

I can add lines to each of those but I can't create
/etc/apt/sources.list.d/bar with 'set' and 'save'

Also - is there a 'magic' string I can use to mean 'highest line
number +1' so I can easily add things from shell scripts without using
actual numbers. So

set /files/etc/lines/magic_string/foo
set /files/etc/lines/magic_string/baz
set /files/etc/lines/magic_string/bar

Or should I just use seriously high numbers and treat it the same way?

  Dean
-- 
Dean Wilson               http://www.unixdaemon.net
Profanity is the one language all programmers understand
--- Anon




More information about the augeas-devel mailing list