[augeas-devel] Re: [Augeas] #86: slapd.conf save fails
Augeas
trac at fedorahosted.org
Wed Sep 9 22:33:17 UTC 2009
#86: slapd.conf save fails
----------------------+-----------------------------------------------------
Reporter: wayland | Owner: lutter
Type: defect | Status: closed
Priority: major | Milestone: next
Component: Augeas | Version: 0.5.1
Resolution: invalid | Keywords:
----------------------+-----------------------------------------------------
Changes (by lutter):
* status: new => closed
* resolution: => invalid
Comment:
The error you're seeing is because the Augeas tree is ordered and the
slapd lens does not allow adding global directives like 'include' in a
database section. Generally, these errors are only reported when you save,
not when you modify the tree, since, in general, it can take several tree
changes to get from one valid tree to another.
Replying to [comment:1 wayland]:
> It even fails if I precede the "set" with:
>
> ins include[last] after /files/etc/openldap/slapd.conf/include[4]
The last element is picked with 'last()', not 'last' (notice the parens) -
you don't need a predicate in [..] for the first argument of ins; the
first argument is just a label for a tree node, and not a full-blown path
expression.
> Just to make things more exciting, I also tried:
>
> ins include[5] after /files/etc/openldap/slapd.conf/include[4]
Same here; use 'ins include after ...'
> set /files/etc/openldap/slapd.conf/include[5]
/etc/openldap/schema/redhat/autofs.schema
>
> According to "ls /files/etc/openldap/slapd.conf/", this inserts the
include statement both in the right place, and at the end of the file.
Confusing.
> Incidentally, the version I'm seeing this in is 0.5.2, but that doesn't
seem to be an option in trac.
Ugh .. forgot to add that version to trac.
I am closing this, since it's not a bug - if you still have trouble with
Augeas' behavior here, feel free to send mail to augeas-devel.
--
Ticket URL: <https://fedorahosted.org/augeas/ticket/86#comment:2>
Augeas <http://augeas.net/>
a configuration API
More information about the augeas-devel
mailing list