[augeas-devel] Unique numbered labels in indexes

Matt Palmer matt at anchor.net.au
Tue Jun 16 03:20:14 UTC 2009


A few days ago David wrote:

> The best way to get unique labels when Augeas autgenerates numbered
> labels (i.e., uses 'seq' in the lens) is to use labels that start with
> '0', i.e. '01', '02' etc.

As lovely as that is, what about all those times when I'm dealing with an
entry that *doesn't* use seq (such as the sudoers lens)?  I just tried the
zero-padding:

set /files/etc/sudoers/spec[01]/user root
[...]

And overwrote an existing entry (specifically, .../spec[1]).  D'oh!  So, am
I going back to 100000, or is there a separate magic trick for indexes?


-- 
Matt Palmer - Systems Administrator

A view into the Anchor Engineroom: http://anchor.com.au/blog/
Web Hosting Knowledgebase: http://anchor.com.au/wiki/

Anchor Systems Pty Ltd - Hosting Heavyweights
W: http://www.anchor.com.u - E: support at anchor.com.au
Phone: 1300 883 979 - Fax: 02 8296 5199




More information about the augeas-devel mailing list