Search code examples
augeas

augtool shows only /etc and /boot


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?


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.