Question

By default augtool can only see the following directories

/etc  
/boot

Root is set to /.

[root@]# augtool ls /files
etc/ = (none)
boot/ = (none)
root/ = (none)

Can't find nothing about it in errors:

[root@]# augtool print /augeas//error (all messages concerns /etc)

How can I make Augeas see other directories?

Was it helpful?

Solution

You require a lens that will filter a path you need.

One hack I did was to modify a filter I wanted (i.e. the xml.aug ) and added the following

 . (incl "/usr/tomcat/apache*/conf/*.xml")

This goes at the end where you have a let filter command already. The end is now

let filter = (incl "/etc/xml/*.xml")
    . (incl "/etc/xml/catalog")
    . (incl "/usr/tomcat/apache*/conf/*.xml")

let xfm = transform lns filter

This will find all xml files in my apache conf directory and make them editable. Appears you'll have to do something simmilar, though I didn't find a best practice for this.

OTHER TIPS

By defaults, Augeas tries to parse all the files it knows about. Most of these configuration files are located in /etc (and sub-directories, just try looking inside /files/etc). /boot is essentially for Grub configuration files.

If you do a print /files, you'll probably see the contents of a few hundred files.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top