[augeas-devel] Named key

David Lutterkort lutter at redhat.com
Mon Apr 26 12:07:53 UTC 2010


On Wed, 2010-04-21 at 15:26 -0700, Patrick wrote:
> 
> Here's an example samba file config
> 
> 
> [global]
> logging = true
> os level = 33
> [homes]
> path = ~
> [other mount]
> path=/what/ever
> 
> 
> 
> 
> In this file, each section only exists once, but the names can be what
> ever the file write wants.  (I think it's limited to the same chars as
> C variable names, but that doesn't matter)
> If I want to change a section, I need to do something like this:
> 
> set /files/etc/samba/smb.conf/target[.='global']/workgroup MSHOME
> 
> 
> It would be easier newbies if the syntax was something closer to this:
> 
> 
> set /files/etc/samba/smb.conf/global/workgroup MSHOME
> 
> 
> The syntax works because duplication of sections isn't allowed.  I'll
> admit that doing this doesn't actually make Augeas more powerful
> though.

That's an entirely different issue, not directly related to '[...]' in
the lens language. IIRC, one of the reasons to make the smb lens work
the way it does is because Samba section names can contain characters
that make the tree a little harder to work with, particularly because
section names can contain spaces.

There's nothing hardwired in Augeas that requires that, but as you
noted, it also doesn't change what you can express.

David





More information about the augeas-devel mailing list