[augeas-devel] Calling augtool from a script

Graham Leggett minfrin at sharp.fm
Tue Apr 23 17:24:13 UTC 2013


Hi all,

According to the FAQ entry at http://augeas.net/faq.html, the augtool command can be used to manipulate the tree from a script, but there doesn't seem to be a link to any documentation that would describe how to do this with working examples.

The closest I've found is the url http://stackoverflow.com/questions/9118123/using-sed-to-change-etc-fstab however trying to follow it's example I get augtool running silently with no error, but not doing anything to the file /etc/fstab:

augtool set '/files/etc/fstab/[file=/home/monica/foo]/file' /home/monica/foo
augtool set '/files/etc/fstab/[file=/home/monica/foo]/spec' /dev/vg001/home-monica-foo
augtool save

Does anyone have a working example of augtool being run from a script?

Does anyone know how to get some kind of diagnostics or debugging out of augtool, to confirm that it is actually doing anything?

Regards,
Graham
--

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4365 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/augeas-devel/attachments/20130423/5c7b65d4/attachment.p7s>


More information about the augeas-devel mailing list