Parses /etc/sysconfig/rhn/up2date
Author: Raphael Pinson rap@gmai l.com hink
Up2date | Parses /etc/sysconfig/rhn/up2date |
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. |
Examples | The Test_Up2date file contains various examples and tests. |
USEFUL PRIMITIVES | |
key_re | |
value_re | |
sep_semi | |
ENTRIES | |
single_entry | key=foo |
multi_empty | key=; |
multi_value | One value in a list setting |
multi_single | key=foo; (parsed as a list) |
multi_values | key=foo;bar key=foo;bar; |
multi_entry | List settings go under a ‘values’ node |
entry | |
LENS | |
lns | |
filter |
This lens applies to /etc/sysconfig/rhn/up2date. See filter.
The Test_Up2date file contains various examples and tests.
let key_re = /[^=# \t\n]+/
let value_re = /[^ \t\n;][^\n;]*[^ \t\n;]|[^ \t\n;]/
let sep_semi = Sep.semicolon
key=foo
let single_entry = [ label "value" . store value_re ]
key=;
let multi_empty = sep_semi
One value in a list setting
let multi_value = [ seq "multi" . store value_re ]
key=foo; (parsed as a list)
let multi_single = multi_value . sep_semi
key=foo;bar key=foo;bar;
let multi_values = multi_value . ( sep_semi . multi_value )+ . del /;?/ ";"
List settings go under a ‘values’ node
let multi_entry = [ label "values" . counter "multi" . ( multi_single | multi_values | multi_empty ) ]
let entry = [ seq "entry" . store key_re . Sep.equal . ( multi_entry | single_entry )? . Util.eol ]
let lns = (Util.empty | Util.comment | entry)*