Up2date

Parses /etc/sysconfig/rhn/up2date

Author: Raphael Pinson rap.nosp@m.hink@gmai.nosp@m.l.com

Summary
Up2dateParses /etc/sysconfig/rhn/up2date
ReferenceThis lens tries to keep as close as possible to `man 5 up2date` where possible.
LicenseThis file is licenced under the LGPLv2+, like the rest of Augeas.
Lens UsageTo be documented
Configuration filesThis lens applies to /etc/sysconfig/rhn/up2date.
ExamplesThe Test_Up2date file contains various examples and tests.
USEFUL PRIMITIVES
key_re
value_re
sep_semi
ENTRIES
single_entrykey=foo
multi_emptykey=;
multi_valueOne value in a list setting
multi_singlekey=foo; (parsed as a list)
multi_valueskey=foo;bar key=foo;bar;
multi_entryList settings go under a ‘values’ node
entry
LENS
lns
filter

Reference

This lens tries to keep as close as possible to `man 5 up2date` where possible.

License

This file is licenced under the LGPLv2+, like the rest of Augeas.

Lens Usage

To be documented

Configuration files

This lens applies to /etc/sysconfig/rhn/up2date.  See filter.

Examples

The Test_Up2date file contains various examples and tests.

USEFUL PRIMITIVES

key_re

let key_re = /[^=# \t\n]+/

value_re

let value_re = /[^ \t\n;][^\n;]*[^ \t\n;]|[^ \t\n;]/

sep_semi

let sep_semi = Sep.semicolon

ENTRIES

single_entry

let single_entry = [ label "value" . store value_re ]

key=foo

multi_empty

let multi_empty = sep_semi

key=;

multi_value

let multi_value = [ seq "multi" . store value_re ]

One value in a list setting

multi_single

let multi_single = multi_value . sep_semi

key=foo; (parsed as a list)

multi_values

let multi_values = multi_value . ( sep_semi . multi_value )+ . del /;?/ ";"

key=foo;bar key=foo;bar;

multi_entry

let multi_entry = [ label "values" . counter "multi" . ( multi_single | multi_values | multi_empty ) ]

List settings go under a ‘values’ node

entry

let entry = [ seq "entry" . store key_re . Sep.equal . ( multi_entry | single_entry )? . Util.eol ]

LENS

lns

let lns = (Util.empty | Util.comment | entry)*

filter

Provides unit tests and examples for the Up2date lens.
let key_re = /[^=# \t\n]+/
let value_re = /[^ \t\n;][^\n;]*[^ \t\n;]|[^ \t\n;]/
let sep_semi = Sep.semicolon
let single_entry = [ label "value" . store value_re ]
key=foo
let multi_empty = sep_semi
key=;
let multi_value = [ seq "multi" . store value_re ]
One value in a list setting
let multi_single = multi_value . sep_semi
key=foo; (parsed as a list)
let multi_values = multi_value . ( sep_semi . multi_value )+ . del /;?/ ";"
key=foo;bar key=foo;bar;
let multi_entry = [ label "values" . counter "multi" . ( multi_single | multi_values | multi_empty ) ]
List settings go under a ‘values’ node
let entry = [ seq "entry" . store key_re . Sep.equal . ( multi_entry | single_entry )? . Util.eol ]
let lns = (Util.empty | Util.comment | entry)*
Close