[augeas-devel] [PATCH] Add sudoers lens and associated test
David Lutterkort
dlutter at redhat.com
Wed Aug 13 17:26:02 UTC 2008
On Wed, 2008-08-13 at 09:53 +0200, Raphaël Pinson wrote:
> I've had this need before, and just worked around it. Basically, the
> need would be for a "value"keyword in the ML implementation, which
> would be to "store" what "label" is to "key", so we could write things
> like :
>
>
> let action_gen (val:string) (kw:string)
> = [ label "action" . del kw kw . value val ]
>
> let action = action_gen "set" "="
> | action_gen "add" "+="
> | action_gen "remove" "-="
>
> let negate = [ label "negate" . ( del /(!{2})*/ "" . value "false" |
> del /!(!{2}*/ "!" . value "true" ) ]
>
> let parameter = [ label "parameter" . negate
> . [ label "name" .
> store /whatever/ ]
> . ( action .
> [ label "value" . store /whatever/ ] )? ]
Yes, that's a good suggestion. Can you add that as a feature request to
Trac ?
> Not to mention that "action" actually has to be set between "name" and
> "value" imo, otherwise it will be ignored by augeas for not being in
> the right position.
Yes, you're right - I was thinking of the slightly different setup I
used in xinetd.aug; but there the name of the parameter is used as the
label of the parent node.
David
More information about the augeas-devel
mailing list